Beidou communication data compression method based on integer adaptive predictor

By using an integer adaptive predictor in Beidou communication data compression, the problems of high computational complexity, rounding error accumulation and lack of data characteristic mutation adjustment mechanism in the prior art are solved, and the lossless compression effect that is efficient, accurate and easy to achieve by hardware is achieved.

CN120150713APending Publication Date: 2025-06-13GUIZHOU POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510034602.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The existing prediction compression technology has problems such as high computational complexity, accumulation of rounding errors, complex parameter optimization, and lack of a data characteristic mutation adjustment mechanism, resulting in a decrease in prediction accuracy and real-time performance.

Method used

The Beidou communication data compression method based on the integer adaptive predictor is adopted. By obtaining historical sampling points as context data, the prediction value is calculated using the integer adaptive predictor, and the weight is adjusted according to the prediction error, and finally the prediction error is encoded in variable length.

Benefits of technology

It realizes an efficient lossless compression solution with accurate calculations, strong adaptability and easy to implement with hardware, eliminates rounding errors, reduces computational complexity, and improves the robustness and real-time performance of the algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120150713A_ABST
    Figure CN120150713A_ABST
Patent Text Reader

Abstract

The invention discloses a Beidou communication data compression method based on an integer adaptive predictor, and relates to the technical field of digital signal processing, and the method comprises the steps: obtaining historical sampling points in a to-be-compressed data stream as context data, and calculating a predicted value of the current sampling point based on the sum of products of each sampling point in the context data and the corresponding integer weight by using an integer adaptive predictor. According to the method, the historical data with the fixed length is collected to serve as context input, and the situation that in a traditional method, the calculation complexity is increased due to dynamic adjustment of the context length is avoided; and then a predicted value is calculated by using an integer adaptive predictor, so that the round-off error problem of floating-point operation is completely eliminated, and reliable guarantee is provided for lossless compression.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital signal processing, and specifically to a Beidou communication data compression method based on an integer adaptive predictor. Background Art

[0002] In the field of digital signal processing, lossless data compression technology, as a key technology for information storage and transmission, has evolved from static compression based on entropy coding to adaptive compression based on prediction. Traditional lossless compression methods mainly include entropy coding techniques such as Huffman coding and arithmetic coding, which achieve compression by analyzing the statistical characteristics of data. With the deepening of application requirements, prediction-based compression technology has gradually become a research hotspot, and its core lies in establishing a prediction model for the data sequence and only encoding and transmitting the prediction error, thereby improving the compression efficiency. In practical applications, the accuracy of the prediction model directly affects the compression performance. Therefore, how to construct an efficient predictor has become an important research direction in this field.

[0003] However, the existing prediction compression technologies have the following deficiencies: First, traditional predictors often use floating-point weights for calculation, which not only increases the computational complexity but also causes error accumulation in the compression process due to rounding errors; Second, the existing adaptive prediction algorithms usually require a complex parameter optimization process, which reduces the real-time performance of the algorithms; Third, many predictors lack an effective adjustment mechanism when facing sudden changes in data characteristics, resulting in a significant decrease in prediction accuracy. These problems severely restrict the application of prediction compression technology in high-performance data processing systems. Summary of the Invention

[0004] In view of the above problems, the present invention is proposed.

[0005] Therefore, the present invention provides a Beidou communication data compression method based on an integer adaptive predictor, which can solve the problems mentioned in the background art.

[0006] To solve the above technical problems, the present invention provides the following technical solution: A Beidou communication data compression method based on an integer adaptive predictor, including: obtaining historical sampling points in the data stream to be compressed as context data, and using an integer adaptive predictor to calculate the predicted value of the current sampling point based on the sum of the products of each sampling point in the context data and the corresponding integer weights;

[0007] Calculating the difference between the current sampling point and the predicted value to obtain a prediction error, identifying the weights corresponding to the maximum and minimum values in the context data, and adjusting the weights corresponding to the maximum and minimum values according to the positive or negative of the prediction error;

[0008] Form the prediction errors into error groups, calculate the minimum bit width in each of the error groups, and perform variable length coding on the error groups according to the minimum bit width.

[0009] As a preferred solution of the Beidou communication data compression method based on an integer adaptive predictor according to the present invention, wherein: the integer adaptive predictor calculates the predicted value of the current sampling point, which is represented by the following formula:

[0010]

[0011] Wherein, P n is the predicted value of the current sampling point, x n-i is the i-th historical sampling point, w i is the integer weight corresponding to the i-th historical sampling point, F is a normalization factor, and N is the number of historical sampling points.

[0012] As a preferred solution of the Beidou communication data compression method based on an integer adaptive predictor according to the present invention, wherein: the weights are adjusted according to the prediction error, which is represented by the following formula:

[0013] Calculate the prediction error e n :

[0014] e n = x n - P n

[0015] Wherein, x n is the actual value of the current sampling point;

[0016] The calculation formula for updating the weights based on the prediction error is:

[0017]

[0018] Wherein, w max is the weight corresponding to the maximum value sampling point in the context data, and w min is the weight corresponding to the minimum value sampling point in the context data.

[0019] As a preferred solution of the Beidou communication data compression method based on an integer adaptive predictor according to the present invention, wherein: the calculation of the minimum bit width is represented by the following formula:

[0020] B = W - CLZ(|e max |)

[0021] Wherein, B is the minimum bit width, W is the original bit width of the input data, CLZ is a function for calculating leading zeros, and |e max | is the maximum absolute value of the prediction error in the error group;

[0022] The bit width change amount ΔB of the error group is represented by the following formula:

[0023] ΔB = B - B prev

[0024] where B prev is the minimum bit width of the previous error group.

[0025] As a preferred solution of the Beidou communication data compression method based on an integer adaptive predictor according to the present invention, wherein: the variable length coding includes:

[0026] If |ΔB| ≤ T 1 , then encode the bit width change amount into a first preset number of bits;

[0027] If |ΔB| > T 1 , then encode the bit width change amount into a second preset number of bits;

[0028] where T 1 is the threshold of the bit width change amount.

[0029] As a preferred solution of the Beidou communication data compression method based on an integer adaptive predictor according to the present invention, wherein: the integer weight initialization step of the integer adaptive predictor includes:

[0030] Initialize the integer weight, which is represented by the following formula:

[0031]

[0032] The normalization factor is set to 2 k , where k is a preset positive integer.

[0033] As a preferred solution of the Beidou communication data compression method based on an integer adaptive predictor according to the present invention, wherein: the integer adaptive predictor adopts a pipeline structure to calculate the predicted value, calculate the prediction error and update the integer weight;

[0034] A parameter cache queue is established in the integer adaptive predictor to store the integer weight, and the update delay of the parameter cache queue is one clock cycle.

[0035] To further solve the above technical problems, the present invention provides the following technical solution: a Beidou communication data compression system based on an integer adaptive predictor, including: an acquisition module for acquiring historical data of a predetermined length as context input according to the input data to be compressed;

[0036] A prediction module for calculating a predicted value according to the context input by using an integer adaptive predictor;

[0037] An error module for calculating a prediction error according to the prediction value;

[0038] An adjustment module for determining whether the prediction error satisfies a reset condition, and if so, resetting the integer weights of the integer adaptive predictor;

[0039] An encoding module for encoding the prediction error to obtain compressed data;

[0040] An update module for updating the integer weights according to the context input and the prediction error.

[0041] A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that when the processor executes the computer program, the steps of the Beidou communication data compression method based on an integer adaptive predictor as described above are implemented.

[0042] A computer-readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps of the Beidou communication data compression method based on an integer adaptive predictor as described above are implemented.

[0043] Advantages of the present invention: By collecting historical data of a fixed length as context input, the present invention avoids the increase in computational complexity caused by dynamically adjusting the context length in traditional methods; then uses an integer adaptive predictor to calculate the prediction value, completely eliminating the rounding error problem of floating-point operations, providing a reliable guarantee for lossless compression; then calculates the prediction error and determines whether it satisfies the reset condition, and overcomes the performance degradation problem of traditional predictors on non-stationary sequences by timely adjusting the integer weights to cope with sudden changes in data characteristics; finally, encodes the prediction error and updates the integer weights based on the error and context. The simplified integer weight update rule not only ensures the convergence of the algorithm but also reduces the computational overhead. The organic combination of these steps realizes an efficient lossless compression scheme with accurate calculation, strong adaptability, and easy hardware implementation, having unique advantages in real-time processing scenarios with limited computing resources. Description of the Drawings

[0044] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.

[0045] Figure 1 It is a flowchart of the method in the present invention;

[0046] Figure 2is a system flow chart of the present invention;

[0047] Figure 3 It is a flow chart of the main steps in the present invention;

[0048] Figure 4 Schematic diagram of the IAP prediction process in the present invention;

[0049] Figure 5 is a flow chart of error grouping and variable length coding in the present invention;

[0050] Figure 6 This is a diagram of a computer device in the present invention. DETAILED DESCRIPTION

[0051] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0052] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0053] Example 1, reference Figures 1 to 5 , as an embodiment of the present invention, provides a Beidou communication data compression method based on integer adaptive predictor.

[0054] Figure 1 An overall flow chart of a Beidou communication data compression method based on an integer adaptive predictor is shown, comprising: S1: obtaining historical sampling points in a data stream to be compressed as context data, and using an integer adaptive predictor to calculate a predicted value of a current sampling point based on the product of each sampling point in the context data and a corresponding integer weight;

[0055] S2: Calculate the difference between the current sampling point and the predicted value to obtain the prediction error, identify the weights corresponding to the maximum and minimum values ​​in the context data, and adjust the weights corresponding to the maximum and minimum values ​​according to the positive and negative of the prediction error;

[0056] S3: Group the prediction errors into error groups, calculate the minimum bit width in each error group, and perform variable length coding on the error groups according to the minimum bit width.

[0057] First, the method collects historical data according to a preset context length, adopting a fixed-length data collection strategy, which avoids the increased computational complexity caused by length adjustment in traditional dynamic context methods. Specifically, in application scenarios where data characteristics are relatively stable, a fixed context length can not only ensure prediction accuracy but also reduce computational and storage overheads. Subsequently, based on the collected historical data, an integer-weight predictor is used to calculate the predicted value of the data to be compressed, and the prediction error between the predicted value and the actual value is calculated. This step innovatively uses integer weights for prediction calculation, completely eliminating the rounding error problem in traditional floating-point operations. At the same time, integer operations significantly reduce the complexity of hardware implementation, which is of great significance in resource-constrained embedded systems. By calculating the prediction error, a data representation with minimal redundancy is provided for subsequent compression coding. Finally, the prediction error is encoded to obtain the compressed data. Since the integer predictor provides an accurate predicted value, the entropy value of the prediction error is significantly reduced, thus achieving a higher compression ratio. In particular, in application scenarios where data shows strong correlation, the compression effect of this method is significantly improved compared with traditional methods.

[0058] By adopting the technical solutions of fixed context length and integer-weight prediction, this method solves the technical problems such as high computational complexity, error accumulation, and difficult hardware implementation existing in traditional compression methods. In practical applications, this solution not only ensures the losslessness of compression but also, due to its simplified calculation process, is particularly suitable for use in real-time data processing systems. Through the innovative application of integer operations, this solution demonstrates unique advantages in terms of computational efficiency and hardware implementation, which are difficult to achieve in simple combinations of traditional technologies. For example, in some data acquisition systems, the integer prediction mechanism of this solution not only reduces the computational amount by more than 50% but also completely avoids the rounding error caused by floating-point operations, ensuring the accuracy of the compression process. This technical effect is obtained from the in-depth understanding and innovative application of the characteristics of integer operations, rather than a simple superposition of existing technologies.

[0059] Furthermore, the integer adaptive predictor calculates the predicted value of the current sampling point, as represented by the following formula:

[0060]

[0061] where P n is the predicted value of the current sampling point, x n-i is the i-th historical sampling point, w i is the integer weight corresponding to the i-th historical sampling point, F is the normalization factor, and N is the number of historical sampling points.

[0062] Furthermore, the weights are adjusted according to the prediction error, as represented by the following formula:

[0063] Calculate the prediction error en :

[0064] e a = x n - P n

[0065] Wherein, x n is the actual value of the current sampling point;

[0066] The calculation formula for updating the weight based on the prediction error is:

[0067]

[0068] Wherein, w max is the weight corresponding to the maximum sampling point in the context data, and w min is the weight corresponding to the minimum sampling point in the context data.

[0069] Furthermore, the calculation of the minimum bit width is expressed by the following formula:

[0070] B = W - CLZ(| emax |)

[0071] Wherein, B is the minimum bit width, W is the original bit width of the input data, CLZ is the function for calculating the leading zeros, and |e max | is the maximum absolute value of the prediction error in the error group;

[0072] The bit width change amount ΔB of the error group is expressed by the following formula:

[0073] ΔB = B - B prev

[0074] Wherein, B prev is the minimum bit width of the previous error group.

[0075] Furthermore, variable-length coding includes:

[0076] If |ΔB| ≤ T 1 , then encode the bit width change amount into the first preset number of bits;

[0077] If |ΔB| > T 1 , then encode the bit width change amount into the second preset number of bits;

[0078] Wherein, T 1 is the threshold of the bit width change amount.

[0079] Furthermore, the integer weight initialization step of the integer adaptive predictor includes:

[0080] Initialize the integer weight, as expressed by the following formula:

[0081]

[0082] Normalization factor, set to 2 k , where k is a preset positive integer.

[0083] Furthermore, the integer adaptive predictor adopts a pipeline structure to calculate the predicted value, calculate the prediction error, and update the integer weights;

[0084] A parameter cache queue is established in the integer adaptive predictor to store the integer weights, and the update delay of the parameter cache queue is one clock cycle.

[0085] Preferably, this embodiment lies in the prediction calculation method and parameter initialization mechanism of the integer adaptive predictor. The technical problem solved by this embodiment is that in the hardware implementation of the existing compression method, the resource overhead brought by floating-point operations is large, and the prediction performance is unstable due to the imperfect parameter initialization and reset mechanism.

[0086] The integer adaptive predictor uses integer linear combination with normalization for prediction calculation. The predicted value P of the current sampling point n is calculated through the formula , where x n-i is the i-th historical sampling point, w i is the corresponding integer weight, and F is the normalization factor. In the initialization stage, the sum of the integer weights w i is equal to the normalization factor F, that is This ensures that the predicted value is within a reasonable range. The normalization factor, set to 2 k (k is a preset positive integer), this setting enables the division operation to be implemented through simple shift operations, significantly reducing the hardware complexity.

[0087] When the weight update exceeds the preset range, the system will reset the weight to the initial value. This reset mechanism prevents the weight from deviating from the reasonable range after long-term cumulative adjustment, ensuring the stability of the predictor. Through actual measurement, when processing the Beidou navigation message, this embodiment sets the normalization factor with k = 4, = 16, the number of historical sampling points N = 4, and the initial weights are all set to 4. This parameter configuration can achieve prediction calculation through simple shift and addition while maintaining the prediction accuracy, and the resource overhead is only 1 / 3 of the traditional floating-point implementation.

[0088] The test results show that the solution of this embodiment has significant advantages over the prior art: First, integer operations replace floating-point operations, which not only simplifies the hardware implementation but also increases the throughput of prediction calculation by 200%; Second, based on 2 kThe normalization factor design enables the division operation to be implemented by shifting, further reducing the resource overhead. Finally, the perfect weight reset mechanism ensures the stability of the predictor during long-term operation, keeping the prediction accuracy above 90%.

[0089] Preferably, this embodiment focuses on the adaptive update mechanism of the predictor weights and its hardware implementation solution. The technical problem solved by this embodiment is that in the existing compression methods, when dealing with dynamically changing data, the parameter update efficiency is low, and the unreasonable hardware pipeline design leads to limited system throughput.

[0090] In terms of the weight update strategy, the system first calculates the prediction error e n = x n - P n , where x n is the actual value of the current sampling point. According to the positive or negative of this error, the system adjusts the weights corresponding to the maximum and minimum values in the context data. When e n > 0, the maximum weight w max increases by 1, and the minimum weight w min decreases by 1; when e n < 0, the maximum weight decreases by 1, and the minimum weight increases by 1; when e n = 0, the weights remain unchanged. This extreme value-based update strategy can quickly adapt to the dynamic changes of data, especially suitable for dealing with burst signals in Beidou communication.

[0091] In terms of hardware implementation, this embodiment adopts a three-stage pipeline structure: the first stage calculates the predicted value, the second stage completes the error calculation, and the third stage performs the weight update. To solve the problem of parameter update delay, the system introduces a parameter cache queue, and the updated weights take effect after a one-clock-cycle delay. This design enables the weight update not to block the data processing pipeline, ensuring the continuous operation of the system.

[0092] Actual measurements show that when dealing with Beidou navigation messages, this embodiment has the following advantages compared with the prior art: First, the extreme value-oriented weight update strategy enables the predictor to adapt to data mutations within 3 - 4 clock cycles, and the response speed is increased by 60%; Second, the introduction of the parameter cache queue enables the system to maintain a stable throughput of 800MB / s under continuous data flow, which is 40% higher than the traditional design; Finally, the optimization of the pipeline structure increases the resource utilization rate of the system to 85%, while the power consumption is only 70% of the conventional implementation. These improvements make the present invention have better adaptability and efficiency in dealing with high-dynamic data.

[0093] Preferably, this embodiment is to elaborate on the calculation of the minimum bitwidth of prediction errors and the encoding method of bitwidth variation. The technical problem solved by this embodiment is that existing compression methods lack an effective bitwidth adaptive mechanism when processing error data, resulting in low compression efficiency, and the bitwidth calculation method is complex, which is not conducive to hardware implementation.

[0094] The system uses the leading zero count method to calculate the minimum bitwidth of the error group. For a data stream with an input bitwidth of W, the minimum bitwidth B of each error group is calculated by the formula B = W - CLZ(|e max |), where CLZ is a function for calculating the number of leading zeros, and |e max | is the maximum absolute value of the prediction error in the error group. The advantage of this design is that the minimum bitwidth can be directly obtained through leading zero counting, avoiding complex logarithmic operations and facilitating implementation in hardware.

[0095] To further improve the compression efficiency, the system introduces the concept of bitwidth variation ΔB = B - Bpreu, where Bpreu is the minimum bitwidth of the previous error group. This differential encoding strategy is particularly suitable for processing continuous data streams in Beidou communication because the bitwidths of adjacent data groups often have strong correlations. Through actual measurement, it is found that when processing Beidou navigation messages, more than 90% of the bitwidth variations between adjacent error groups are concentrated within the range of ±2 bits, which provides an effective data basis for subsequent variable-length encoding.

[0096] The actual measurement results show that the solution of this embodiment has significant advantages: First, the bitwidth calculation method based on leading zero counting enables hardware implementation to only require simple shift and counting circuits, reducing the resource overhead by 45%; Second, the bitwidth differential encoding strategy can on average compress the error data to 35% of the original data volume, improving the compression rate by 25% compared with traditional fixed-bitwidth encoding; Finally, in practical applications, this solution can complete bitwidth calculation and encoding within one clock cycle, supporting a data processing rate of up to 1 GB / s.

[0097] These improvements enable the present invention to maintain a high compression rate while achieving efficient hardware implementation when processing high-speed data streams. Especially in the Beidou communication system, this solution can adapt to the dynamic changes of different types of signals while maintaining stable compression performance.

[0098] Preferably, this embodiment is to elaborate on the variable-length encoding strategy and its threshold design method. The technical problem solved by this embodiment is that existing compression methods use a fixed encoding method when processing bitwidth variations, failing to fully utilize the statistical characteristics of bitwidth variations, resulting in unsatisfactory compression efficiency, and lacking an encoding optimization mechanism for the data characteristics of Beidou communication.

[0099] The system designs a dual-threshold encoding strategy based on the statistical characteristics of the bitwidth variation ΔB. When |ΔB| ≤ T1 When it is, the system encodes using the first preset number of digits (3 digits); when |ΔB| > T 1 it is, then it encodes using the second preset number of digits (6 digits). The threshold T 1 is selected based on the actual characteristics of the Beidou communication data and is determined to be 4 through a large amount of data statistical analysis. The design basis of this segmented encoding strategy is that in the Beidou navigation message, the bit width change usually shows the characteristics of mainly small-range fluctuations and supplemented by large fluctuations.

[0100] In the specific implementation, the system adopts the following encoding rules:

[0101] When |ΔB| ≤ 4, 3-bit encoding is used. The first bit is the flag bit 0, and the last two bits store the actual change amount; when |ΔB| > 4, 6-bit encoding is used. The first bit is the flag bit 1, and the last five bits store the actual change amount; at the beginning of each encoding cycle, an additional sign bit is added to represent the positive or negative of the change amount.

[0102] The actual measurement results show that the solution of this embodiment has significant advantages: First, the targeted threshold design enables more than 90% of the bit width change amounts to be represented by 3-bit encoding, saving an average of 50% of the storage space; second, while maintaining a high compression ratio, the segmented encoding strategy only requires simple shift and judgment operations during the decoding process, and the decoding delay is reduced to 40% of the original; finally, the entire encoding process can be completed within a single clock cycle, supporting real-time compression processing.

[0103] These improvements enable the present invention to maintain a high compression ratio while processing Beidou communication data and can adapt to the dynamic changes of the data. Especially when processing signals with sudden changes, this solution can still maintain stable compression performance, and at the same time, the hardware implementation is simple and the resource overhead is small.

[0104] Preferably, in the prediction calculation method and parameter initialization mechanism of the integer adaptive predictor, the selection of the normalization factor F needs to consider the balance between prediction accuracy and hardware complexity. F is set to 2 k in the form, where the selection of the k value directly affects the system performance. The actual measurement shows that in the processing of Beidou communication data, the recommended selection range of the k value is between 3 and 5: when k < 3, the quantization accuracy is insufficient and the prediction accuracy rate decreases; when k > 5, the multiplier resource consumption increases significantly and the accuracy improvement is limited. When k = 4, the system can achieve the best performance-cost ratio.

[0105] The weight initialization adopts a uniform distribution strategy, i.e., wi = F / N. This initialization method ensures the constraint condition of ∑wi = F, and at the same time assigns the same initial importance to all historical sampling points. Under the parameter configuration given in the second embodiment (F = 16, N = 4), the initial weights are all 4. This configuration enables the system to have basic prediction capabilities at the startup stage, and the predicted values will not show significant fluctuations.

[0106] Preferably, in the adaptive update mechanism of the predictor weight, the weight update needs to consider the boundary conditions. When the updated weight value exceeds the range of [0, 2F], the reset mechanism is triggered. This design prevents the weight from deviating from the reasonable range after long-term cumulative adjustment. Especially when dealing with burst signals, if the weight value is too large or too small, it will cause a significant decline in prediction performance.

[0107] The parameter cache queue adopts a FIFO structure, and the queue depth is 1. The updated weight takes effect in the next clock cycle, ensuring that the pipelined operations of prediction calculation and weight update do not interfere with each other. This design simplifies the timing control logic while ensuring the continuous operation of the system.

[0108] Preferably, in the minimum bit-width calculation method of the prediction error, the composition of the error group has an important impact on the compression efficiency. Each group contains 4 consecutive prediction error values, and this group size is determined based on the time correlation characteristics of the Beidou communication data. Too large a group size will increase the cache overhead and reduce the real-time performance, while too small a group size will reduce the compression efficiency.

[0109] The CLZ function is implemented by a priority encoder in hardware, adopting a two-stage combinational logic structure. The first stage detects the position of the most significant bit, and the second stage converts the position information into the number of leading zeros. This implementation method ensures that the minimum bit-width calculation can be completed within one clock cycle.

[0110] Preferably, in the variable-length coding strategy, the coding of the bit-width change amount needs to handle out-of-range situations. When |ΔB| exceeds the maximum value that can be represented by 5-bit coding, the system divides the current error group into multiple subgroups. The bit-width change amount of each subgroup is ensured to be within the encodable range, thus guaranteeing the correctness of the coding.

[0111] The setting of the double threshold is based on the statistical distribution characteristics of the bit-width change amount. The reason for choosing the threshold T1 = 4 is that more than 90% of the bit-width change amounts in the measured data are within ±4, and using 3-bit coding can significantly improve the compression efficiency. For the change amounts exceeding T1, using 6-bit coding ensures that no information is lost during the coding process.

[0112] In summary, the present invention adopts an integer weight predictor and combines an efficient adaptive update strategy to achieve error-free accumulation in prediction calculation. At the same time, a prediction error monitoring and weight reset mechanism is introduced to effectively cope with changes in data characteristics. The present invention has the following beneficial effects: rounding errors are eliminated through integer operations, reducing the computational complexity; the algorithm efficiency is improved by adopting a simplified weight update rule; the robustness of the algorithm is enhanced through an adaptive adjustment mechanism.

[0113] Example 2. Refer to Figure 2 , which is an embodiment of the present invention, provides a Beidou communication data compression system based on an integer adaptive predictor, including: a collection module for collecting historical data of a predetermined length as context input according to the input data to be compressed; a prediction module for calculating a prediction value according to the context input by using the integer adaptive predictor; an error module for calculating a prediction error according to the prediction value; an adjustment module for determining whether the prediction error meets the reset condition, and if so, resetting the integer weight of the integer adaptive predictor; an encoding module for encoding the prediction error to obtain compressed data; and an update module for updating the integer weight according to the context input and the prediction error.

[0114] In summary, by obtaining fixed-length historical data as context input through the collection module, it avoids the waste of computing resources caused by the uncertain context length in the traditional method; the prediction module uses an integer weight predictor for calculation, completely eliminating the rounding error caused by floating-point operations and reducing the complexity of hardware implementation at the same time; the error module calculates the prediction error based on the prediction value, providing a data representation with the least redundancy for subsequent encoding; the adjustment module improves the adaptability of the algorithm to non-stationary data sequences by monitoring the prediction error in real time and determining whether it meets the reset condition, and adjusting the predictor state in time when the data characteristics change suddenly; the encoding module encodes the prediction error, and since the entropy value of the prediction error is significantly lower than that of the original data, a higher compression ratio is achieved; the update module adopts a simplified integer weight update rule, reducing the computational cost while ensuring convergence. The collaborative effect of each module enables the present invention to achieve a data compression scheme with accurate calculation, high hardware efficiency and adaptive ability on the premise of ensuring lossless compression.

[0115] Example 3. Refer to Figure 3, which is an embodiment of the present invention and is different from the previous embodiment in that when the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the 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 for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0116] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch instructions from the instruction execution system, apparatus, or device and execute the instructions), or in combination with these instruction execution systems, apparatus, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in combination with an instruction execution system, apparatus, or device.

[0117] More specific examples (non-exhaustive list) of computer-readable media include the following: electrical connection parts (electronic devices) having one or more wirings, portable computer disk cartridges (magnetic devices), random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memories), fiber optic devices, and portable compact disc read-only memories (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which a program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, then editing, interpreting, or otherwise processing it as appropriate, and then storing it in a computer memory.

[0118] It should be understood that each part of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one of the following techniques known in the art or a combination thereof can be used: discrete logic circuits having logic gate circuits for implementing logic functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0119] Importantly, the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.

Claims

1. A Beidou communication data compression method based on integer adaptive predictor, characterized in that: include: Acquire historical sampling points in the data stream to be compressed as context data, and use an integer adaptive predictor to calculate a predicted value of a current sampling point based on the product of each sampling point in the context data and a corresponding integer weight; Calculating the difference between the current sampling point and the predicted value to obtain a prediction error, identifying weights corresponding to the maximum value and the minimum value in the context data, and adjusting the weights corresponding to the maximum value and the minimum value according to the positive or negative value of the prediction error; The prediction errors are grouped into error groups, a minimum bit width in each of the error groups is calculated, and variable length coding is performed on the error groups according to the minimum bit width.

2. The Beidou communication data compression method based on integer adaptive predictor as claimed in claim 1, characterized in that: The integer adaptive predictor calculates the predicted value of the current sampling point, which is expressed by the following formula: Among them, P n is the predicted value of the current sampling point, x n-i is the i-th historical sampling point, w i is the integer weight corresponding to the i-th historical sampling point, F is the normalization factor, and N is the number of historical sampling points.

3. The Beidou communication data compression method based on integer adaptive predictor as claimed in claim 2, characterized in that: The weight is adjusted according to the prediction error, as shown in the following formula: Calculate the prediction error e n : And n =x n -P n Among them, x n is the actual value of the current sampling point; The calculation formula for updating weights based on prediction error is: Among them, w max is the weight corresponding to the maximum value sampling point in the context data, w min is the weight corresponding to the minimum sampling point in the context data.

4. The Beidou communication data compression method based on integer adaptive predictor as claimed in claim 3, characterized in that: The calculation of the minimum bit width is expressed by the following formula: B=W-CLZ(|e max |) Where B is the minimum bit width, W is the original bit width of the input data, CLZ is the function for calculating leading zeros, |e max | is the maximum absolute value of the prediction error in the error group; The bit width variation ΔB of the error group is expressed by the following formula: ΔB=B-B preυ Among them, B preυ is the minimum bit width of the previous error group.

5. The Beidou communication data compression method based on integer adaptive predictor as claimed in claim 4, characterized in that: The variable length coding comprises: If |ΔB|≤T1, the bit width variation is encoded as a first preset bit number; If |ΔB|>T1, the bit width variation is encoded as a second preset bit number; Wherein, T1 is the threshold value of the bit width variation.

6. The Beidou communication data compression method based on integer adaptive predictor as claimed in claim 5, characterized in that: The integer weight initialization step of the integer adaptive predictor comprises: Initialize the integer weights, as expressed by the following formula: The normalization factor F is set to 2 k , where k is a preset positive integer.

7. The Beidou communication data compression method based on integer adaptive predictor according to any one of claims 1 to 6, characterized in that: The integer adaptive predictor adopts a pipeline structure to calculate the predicted value, calculate the prediction error and update the integer weight; A parameter cache queue is established in the integer adaptive predictor to store the integer weights, and an update delay of the parameter cache queue is one clock cycle.

8. A system using the Beidou communication data compression method based on integer adaptive predictor as claimed in any one of claims 1 to 7, characterized in that: include: A collection module, used for collecting historical data of a predetermined length as context input according to the input data to be compressed; A prediction module, configured to calculate a prediction value based on the context input using an integer adaptive predictor; An error module, used for calculating a prediction error according to the prediction value; an adjustment module, configured to determine whether the prediction error satisfies a reset condition, and if so, reset the integer weight of the integer adaptive predictor; An encoding module, used for encoding the prediction error to obtain compressed data; An updating module is used to update the integer weight according to the context input and the prediction error.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the Beidou communication data compression method based on integer adaptive predictor described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the Beidou communication data compression method based on an integer adaptive predictor according to any one of claims 1 to 7 are implemented.