Numeric data compression method and computing device

Determining the numerical data format and selecting an appropriate compression algorithm through the prediction model solves the problem that existing technology cannot adapt to different data stream formats in complex scenarios, and achieves universal compression and efficient compression of numerical data.

WO2024193243A1PCT designated stage expired Publication Date: 2024-09-26HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2024/075122
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-22
Filing Date
2024-02-01
Publication Date
2024-09-26

AI Technical Summary

Technical Problem

Existing numerical data compression methods cannot adapt to the different numerical data formats in different data streams in complex scenarios, resulting in poor compression effects and inability to meet actual application needs.

Method used

The prediction model is used to predict the numerical data format in the data stream, and an appropriate compression algorithm is selected to compress the data based on the prediction results to achieve universal compression of numerical data in various formats and distribution patterns.

Benefits of technology

It achieves the versatility of numerical data compression in complex scenarios, improves user experience, meets business needs, and is suitable for massive data scenarios such as scientific computing and big data communications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024075122_26092024_PF_FP
    Figure CN2024075122_26092024_PF_FP
Patent Text Reader

Abstract

The present application provides a numeric data compression method and a computing device. A format of binary numeric data inputted into each data stream is predicted by means of at least one prediction model, so as to acquire the format corresponding to the binary numeric data in any data stream, and subsequently, the binary data can be compressed by using a compression algorithm corresponding to the format. Because a corresponding format of numeric data in each data stream can be determined, the method is suitable for compression of numeric data in a complex scenario, thereby achieving the universality of numeric data compression, satisfying the service requirements, and improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

A method and computing device for compressing numerical data

[0001] This application claims priority to the Chinese patent application with application number 202310319119.4 filed with the State Intellectual Property Office of China on March 22, 2023, and priority to the Chinese patent application with the invention name “A method and computing device for numerical data compression”, all contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of numerical data compression, and more specifically to a method and computing device for numerical data compression. Background Art

[0003] When using classic compression algorithms to compress numerical data, it's necessary to first clarify the format of the numerical data and ensure that the numerical data meets specific distribution patterns. This is crucial for achieving optimal compression results. For example, when using classic compression algorithms to compress numerical data, it's necessary to first clarify the type of the numerical data, such as short, int, long, or float. Furthermore, it's necessary to clarify the length of the numerical data. For example, the length of byte-type numerical data is 8 bits, the length of integer-type numerical data can be 8 or 16 bits, and the length of floating-point numbers can be 16 or 32 bits. Only after the format of the numerical data is determined can classic compression algorithms be used for compression. For another example, current compression algorithms work best when compressing two adjacent, relatively similar numerical data.

[0004] Currently, one possible approach is to parse the file format of a data stream to obtain the format of the numerical data in that data stream. However, considering the cost of computer hardware, in practice, the file format contained in each data stream is not parsed to obtain the format of the numerical data contained in each data stream. Typically, the file formats contained in the first few data streams are parsed to obtain the format of the numerical data. Based on the format of the numerical data, the corresponding compression algorithm is then used to uniformly compress the numerical data in all subsequent data streams. This approach is therefore only suitable for small-scale or single-scenario applications.

[0005] However, in real-world applications, there are numerous production environments and scenarios that need to be supported. In complex scenarios, the formats of the numeric data contained in each data stream may vary. Existing compression methods are unable to meet business requirements in these complex scenarios, effectively failing to meet business needs. Therefore, a method for compressing numeric data that can meet the needs of real-world applications is needed.

[0006] Summary of the Invention

[0007] The present application provides a method for compressing numerical data, which can realize compression of numerical data in various formats or with any distribution pattern using a compression algorithm. There is no need to obtain the format of the numerical data by parsing the file, which realizes the versatility of numerical data compression and improves the user experience.

[0008] In the first aspect, a method for compressing numerical data is provided. The method can be executed by a unit, module, or device in a chip that can realize the numerical data compression function, or it can also be executed by a component (for example, a chip or circuit) of a module that can realize the numerical data compression function in a chip, without limitation.

[0009] The method includes: obtaining multiple data streams, each data stream containing binary numerical data; predicting the format of the numerical data contained in each data stream in the multiple data streams according to at least one prediction model, each prediction model in the at least one prediction model is used to predict the format of the numerical data, the input of each prediction model is the numerical data, and the output of each prediction model is the format of the numerical data, wherein the format of the numerical data includes at least one of the following: the type of the numerical data, the length of the numerical data, and the big and small ends of the numerical data; according to the predicted format of the numerical data in each data stream, using a compression algorithm to compress the numerical data in each data stream.

[0010] The "data stream" in this application can be, for example, a byte stream, a character stream, or can be, for example, multiple "data files".

[0011] The term "numeric data" in this application can also be replaced by "numeric data". For example, numeric data can include integers (int), floating-point numbers (float), decimals (decimal), fractions, and complex numbers. Integers and floating-point numbers are commonly used.

[0012] For example, at least one prediction model includes: a technical expert prediction model and / or a machine learning prediction model. It should be noted that the "prediction model" mentioned in this application is not limited to the above two models. Any model that can predict the format of binary numerical data can be used in the solution of this application.

[0013] For example, a machine learning prediction model is obtained based on model training, and the training data set includes at least one of the following information: type information of the numerical data, length information of the numerical data, and big and small end information of the numerical data. The present application does not limit the specific process or method of model training. For example, the model can be trained using existing standard supervised training or unsupervised training.

[0014] It should be understood that the "compression algorithm" in this application can be understood as a compression algorithm corresponding to or adapted for the numerical data. For example, if the format of the numerical data is 2 bytes and integer, then the compression algorithm suitable for the format can be used to compress the numerical data.

[0015] Based on the above technical solution, in this application, the format of the binary numerical data input into each data stream is predicted by at least one prediction model, and the corresponding format of the binary numerical data in any data stream can be obtained. Subsequently, the binary data can be compressed using a compression algorithm corresponding to the format. Moreover, since the corresponding format of the numerical data in each data stream can be determined, it is suitable for the compression of numerical data in complex scenarios, realizes the versatility of numerical data compression, meets business needs and improves user experience.

[0016] In one possible implementation, predicting the format of the numerical data contained in each data stream based on at least one prediction model includes: randomly sampling the numerical data in each data stream to obtain first numerical data, wherein the first numerical data is partial numerical data of the numerical data in each data stream; predicting the format of the first numerical data contained in each data stream based on the at least one prediction model; and predicting the format of the numerical data contained in each data stream based on the predicted format of the first numerical data.

[0017] Based on the above technical solution, in this application, in order to speed up the prediction speed, the numerical data in the data stream can be randomly sampled first, and then the sampled numerical data can be predicted and the format of the entire binary numerical data can be inferred, thereby improving efficiency.

[0018] In one possible implementation, the format of the first numerical data is a first format, and the compression algorithm is used to compress the numerical data in each data stream based on the predicted format of the numerical data in each data stream, including: determining at least one compression algorithm corresponding to the first format; compressing the first numerical data according to the at least one compression algorithm to obtain at least one compressed first numerical data; determining the compression index corresponding to each of the at least one compressed first numerical data, and determining a first compression algorithm from the at least one compression algorithm based on the compression index; and compressing each numerical data in each data stream according to the first compression algorithm.

[0019] In this application, "compression index" may include at least one of the following: compression ratio of numerical data, compression efficiency, amount of data after compression of numerical data ("entropy" of numerical data), compression speed of numerical data, etc.

[0020] Based on the above scheme, this application proposes that the format of the sampled numerical data can be predicted first. If the formats predicted by each model are the same, the numerical data used can be processed first using each compression algorithm corresponding to the format. According to the indicators of the numerical data compressed by each compression algorithm, a compression algorithm is finally determined, and the entire numerical data is compressed. This can not only ensure the selection of an appropriate compression algorithm but also reduce the compression time.

[0021] In a possible implementation, predicting the format of the first numerical data contained in each data stream according to at least one prediction model includes: predicting at least two formats corresponding to the first numerical data contained in each data stream according to at least two prediction models.

[0022] In one possible implementation, the format of the numerical data in each data stream is predicted, and a compression algorithm is used to compress the numerical data in each data stream, including: determining at least one compression algorithm corresponding to each of the at least two formats; compressing the first numerical data according to the at least one compression algorithm corresponding to each format to obtain at least two compressed first numerical data; determining a compression index corresponding to each of the at least two compressed first numerical data, and determining a first format corresponding to the first numerical data and a first compression algorithm corresponding to the first format in the at least two formats according to the compression index; and compressing the numerical data in each data stream according to the first format and the first compression algorithm corresponding to the first format.

[0023] Based on the above scheme, this application proposes that the format of the sampled numerical data can be predicted first. If multiple prediction models predict different formats for the sampled numerical data, the sampled numerical data can be compressed using the multiple predicted formats and the compression algorithms corresponding to each of the multiple formats. The compression index after compression can be used to determine the most suitable format and one of the compression algorithms for that format. This can ensure that the appropriate compression algorithm is selected and reduce compression time.

[0024] This application proposes the use of multiple prediction models and compression algorithms to achieve optimal compression results for various numerical data with different data distribution patterns. Specifically, on the one hand, multiple prediction models allow the format of the binary numerical data to be inferred from multiple perspectives, thereby ensuring accurate identification of the data format. On the other hand, the corresponding compression algorithm is designed specifically for each format, enabling targeted processing of the binary numerical data. Based on this solution, the processing effect of the binary numerical data can be guaranteed.

[0025] In a second aspect, a computing device is provided, the device being configured to execute the method of any possible implementation of the first aspect. Specifically, the device may include units and / or modules, such as a transceiver unit and / or a processing unit, configured to execute the method of any possible implementation of the first aspect.

[0026] In one implementation, the apparatus is a computing device for implementing a numerical data compression function. When the apparatus is a computing device, the communication unit may be a transceiver or an input / output interface; and the processing unit may be at least one processor. Alternatively, the transceiver may be a transceiver circuit. Alternatively, the input / output interface may be an input / output circuit.

[0027] In another implementation, the apparatus is a chip, chip system, or circuit of a computing device for implementing a numerical data compression function in a chip. When the apparatus is a chip, chip system, or circuit of a device for implementing a numerical data compression function, the communication unit may be an input / output interface, interface circuit, output circuit, input circuit, pin, or related circuit on the chip, chip system, or circuit; and the processing unit may be at least one processor, processing circuit, or logic circuit.

[0028] In a third aspect, a computing device is provided, comprising: at least one processor configured to execute a computer program or instructions stored in a memory to perform the method of any possible implementation of the first aspect. Optionally, the device further comprises a memory configured to store the computer program or instructions. Optionally, the device further comprises a communication interface, through which the processor reads the computer program or instructions stored in the memory.

[0029] In one implementation, the apparatus is a numerical data compression function computing device used in a chip.

[0030] In another implementation, the device is a chip, chip system or circuit for numerical data compression in a chip.

[0031] In a fourth aspect, the present application provides a processor, comprising: an input circuit, an output circuit, and a processing circuit. The processing circuit is configured to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method of any possible implementation of any aspect of the first aspect.

[0032] In a specific implementation, the processor may be one or more chips, the input circuit may be an input pin, the output circuit may be an output pin, and the processing circuit may be a transistor, a gate circuit, a trigger, or various logic circuits. The input signal received by the input circuit may be, for example, but not limited to, received and input by a transceiver, and the signal output by the output circuit may be, for example, but not limited to, output to and transmitted by a transmitter. The input circuit and the output circuit may be the same circuit, which functions as an input circuit and an output circuit at different times. The embodiments of the present application do not limit the specific implementation of the processor and various circuits.

[0033] For the operations such as sending and acquiring / receiving involved in the processor, unless otherwise specified, or if they do not conflict with their actual functions or internal logic in the relevant descriptions, they can be understood as processor output, reception, input and other operations, and can also be understood as sending and receiving operations performed by the radio frequency circuit and antenna. This application does not limit this.

[0034] In a fifth aspect, a processing device is provided, comprising a processor and a memory. The processor is configured to read instructions stored in the memory and receive signals via a transceiver and transmit signals via a transmitter to execute the method of any possible implementation of the first aspect.

[0035] Optionally, there are one or more processors and one or more memories.

[0036] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0037] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips. The embodiments of the present application do not limit the type of memory and the setting method of the memory and the processor.

[0038] It should be understood that related data interaction processes, such as sending indication information, can be the process of outputting indication information from the processor, and receiving capability information can be the process of receiving input capability information from the processor. Specifically, data output by the processor can be output to the transmitter, and input data received by the processor can be received from the transceiver. The transmitter and transceiver can be collectively referred to as a transceiver.

[0039] The processing device in the fifth aspect may be one or more chips. The processor in the processing device may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like; when implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory, which may be integrated into the processor or located independently of the processor.

[0040] In a sixth aspect, a computer-readable storage medium is provided, which stores a program code for execution by a device, wherein the program code includes a method for executing any possible implementation of the first aspect.

[0041] In a seventh aspect, a computer program product comprising instructions is provided, which, when run on a computer, enables the computer to execute the method in any possible implementation of the first aspect.

[0042] In an eighth aspect, a chip system is provided, comprising a processor for calling and running a computer program from a memory, so that a device equipped with the chip system executes the methods in each implementation of the above-mentioned first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] FIG1 is a schematic diagram of a system architecture applicable to the present application.

[0044] FIG2 is a schematic diagram of compressing numerical data using an existing compression algorithm.

[0045] FIG3 is a schematic flow chart of a method 300 for compressing numerical data provided by the present application.

[0046] FIG4 is a schematic block diagram of a computing device 100 provided in this application.

[0047] FIG5 is a schematic block diagram of a computing device 200 provided in this application. DETAILED DESCRIPTION

[0048] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.

[0049] The term "numeric data" in this application can also be replaced by "numeric data". For example, numeric data can include integers (int), floating-point numbers (float), decimals (decimal), fractions, and complex numbers. Integers and floating-point numbers are commonly used.

[0050] FIG1 is a schematic diagram of a system architecture applicable to the present application. As shown in FIG1(a), an application can write numerical data to a computing cluster, transmit numerical data over a network, write numerical data to a cache, and perform numerical data compression before finally storing it on a disk (e.g., a mechanical hard disk or a solid-state drive), i.e., in a storage cluster. As shown in FIG1(b), when numerical data is transmitted end-to-end, it can be written to a cache, and before it is stored on a disk, it needs to be compressed, and when it is read, it can be decompressed.

[0051] When compressing numeric data using a classic compression algorithm, on the one hand, it is necessary to parse the file storing the numeric data to obtain the format of the numeric data, and on the other hand, the numeric data must meet a specific distribution pattern. For example, when using a classic compression algorithm to compress numeric data, it is first necessary to determine whether the numeric data type is a short integer, an integer, a long integer, or a floating point, etc.; and it is also necessary to determine the length of the numeric data, for example, the length of byte numeric data is 8 bits, the length of integer numeric data can be 8 bits or 16 bits, and the length of floating point data can be 16 bits or 32 bits; in addition, whether the storage mode is big endian or little endian, etc. In other words, only after the format of the numeric data is determined can the classic compression algorithm be used for compression. It is worth noting that current compression algorithms are more effective when compressing two adjacent numeric data that are relatively similar.

[0052] It should be noted that the compression algorithm in this application may be a classic compression algorithm, such as the sprintz compression algorithm, the FPC compression algorithm, the run length encoding (RLE) algorithm, the Huffman algorithm, the Rice algorithm, the Snappy compression algorithm, the LZ4 compression algorithm, the Simple8b compression algorithm, the LZO compression algorithm, and the like. Another example is the single precision double precision (SPDP) compression algorithm. Another example may include other non-classical algorithms, such as other customized compression algorithms, and the like. In other words, the compression algorithm is not limited in this application.

[0053] Figure 2 shows the process of compressing numerical data using the existing sprintz compression algorithm. This compression algorithm is a compression algorithm for time series, for example, an IoT time series compression algorithm. The compression algorithm mainly includes the following steps:

[0054] Step 1: Determine the predicted value

[0055] "Prediction" means using the previous value to predict the current value. As shown in Figure 2 (a), if the values ​​in the first row of a list are "-3, 2, 104," then the previous value in the first row can be considered "0, 0, 0," so the predicted value is still "0, 0, 0." Alternatively, the previous value is used as the prediction for the current value.

[0056] Step 2: Determine the residual

[0057] The calculation formula of "residual" in this application is: residual = current value - predicted value, which can also be understood as the current value minus the previous value. As shown in (b) in Figure 2, assuming that the value of the second row in the list is "5,2,104", then "5,2,104" can be considered as the current value, so the residual is "8,0,0". Assuming that the value of the third row in the list is "10,2,103", then "10,2,103" can be considered as the current value. At this time, the predicted value is the value of the second row, that is, the predicted value is "5,2,104", so the residual is "5,0,-1". By analogy, assuming that the value of the fourth row in the list is "15, 2, 102", then "10, 2, 103" can be considered as the predicted value. At this time, the predicted value is the value of the third row, that is, the predicted value is "10, 2, 103", so the residual is "5, 0, -1", and so on. (c) in Figure 2 shows the residual corresponding to each row in (b) in Figure 2.

[0058] Step 3: Encode the residual

[0059] For example, the "Zigzag" algorithm can be used to encode the residual. Specifically, the Zigzag algorithm refers to multiplying positive numbers by 2 and taking the absolute value of negative numbers, then multiplying by 2 and adding 1. The residual in Figure 2 (c) is encoded, and the encoding result is shown in Figure 2 (d).

[0060] Step 4, press and go to 0

[0061] "Compress and remove 0" means: record the highest bit of each encoded residual, and then remove the high-bit 0 and compress it. Assuming that the values ​​of (d) in Figure 2 are all integers and are represented by 8-bit binary numbers, (e) in Figure 2 can be obtained. It can be observed that in the binary numbers of the "dX" column in Figure 2 (e), the highest bit "1" is the fifth bit, so the binary numbers of the "dX" column need to retain five binary bits from right to left; for the binary numbers of the "dY" column, they are all 0 and there is no highest bit 1, so the binary numbers of the "dY" column do not need to be recorded; for the binary numbers of the "dZ" column, the highest bit "1" is the first bit, so the binary numbers of the "dZ" column need to retain 1 binary bit from right to left. Specifically, when recording, the following two situations can be used for recording. Among them, the "byte-aligned column-stored encoded data" in case (1) is recorded separately according to each column, that is, after recording the "dX" column, the "dZ" column is recorded; the "byte-aligned row-stored encoded data" in case (2) is recorded separately according to each row, that is, after recording the first row, the second row is recorded. And it can be seen that in case (2), it is recorded according to the byte length. Therefore, after recording each row, two binary digits need to be added, that is, "2bit", which is indicated by "2b" in the figure. In addition, as mentioned above, the binary number of the "dX" column needs to record 5 binary digits, the binary number of the "dY" column needs to record 0 binary digits, and the binary number of the "dZ" column needs to record 1 binary digit. Therefore, the headers are "101" (that is, the binary number corresponding to "5"), "000" (that is, the binary number corresponding to "0"), and "001" (that is, the binary number corresponding to "1") respectively. Moreover, regardless of case (1) or case (2), if two bytes (i.e., 16 bits) are used for recording, since the front header already occupies 9 bits, a 7-bit binary number (i.e., 16-9=7b) needs to be added.

[0062] The above steps 1 to 4 briefly explain the main process of compressing numerical data using the sprintz compression algorithm. It can be seen that when compressing numerical data according to the existing compression algorithm, the type and length of the numerical data must be determined first, and then the classic compression algorithm can be used for compression. In addition, the effect is better when compressing two adjacent relatively similar numerical data.

[0063] Currently, one possible approach is to parse the file format of a data stream to obtain the format of the numerical data in that data stream. However, considering the cost of computer hardware, in practice, the file format contained in each data stream is not parsed to obtain the format of the numerical data contained in each data stream. Typically, the file formats contained in the first few data streams are parsed to obtain the format of the numerical data. Based on the format of the numerical data, the corresponding compression algorithm is then used to uniformly compress the numerical data in all subsequent data streams. This approach is therefore only suitable for small-scale or single-scenario applications.

[0064] In other words, in actual applications, there are many production environments and scenarios that need to be supported. When in complex scenarios, the format of the numerical data contained in each data stream may be different. According to the existing compression method, it is impossible to meet business needs in complex scenarios. For example, according to the existing method, the following problem is very likely to occur: the numerical data in the subsequent data stream is obviously 4-byte floating-point numerical data, but it is still compressed using the 2-byte integer compression algorithm obtained by parsing the file of the previous data stream. It can be seen that the existing method of compressing numerical data cannot meet business needs well. Therefore, there is a need for a method of compressing numerical data that can meet the needs of actual applications.

[0065] In view of this, the present application proposes a method for compressing numerical data, which is suitable for compressing numerical data in complex scenarios, realizes the versatility of numerical data compression, can meet business needs, and improve user experience.

[0066] The solution provided in this application can be applied to scenarios with massive amounts of numerical data, such as HPC clusters for scientific computing, where data storage and node communication are provided. Scenarios such as energy exploration, supercomputing centers, and meteorological and oceanographic simulations all require massive amounts of numerical data and require compression.

[0067] FIG3 is a schematic flow chart of a method 300 for compressing numerical data provided by the present application. As shown in FIG3 , the method includes:

[0068] Step 301: Acquire multiple data streams, each of which contains binary numerical data.

[0069] The "data stream" in this application can be, for example, a byte stream, a character stream, or can be, for example, multiple "data files".

[0070] In the present application, when binary numerical data is input, it can be binary numerical data of any format and any distribution pattern, that is, there is no need to parse the file or data stream storing the numerical data to obtain the format of the numerical data.

[0071] In the present application, the format of numerical data includes at least one of the following: the type of numerical data, the length of the numerical data, and the big and small ends of the numerical data.

[0072] Step 302: predict the format of the numerical data contained in each of the multiple data streams according to at least one prediction model.

[0073] In the present application, multiple prediction models can be preset in advance for predicting the format of input binary numerical data. In one possible implementation, at least one prediction model includes: a technical expert prediction model and / or a machine learning prediction model.

[0074] In this application, the input of each prediction model is numerical data, and the output is in the format of the numerical data.

[0075] In this application, the technical expert prediction model can be understood as determining the format of numerical data based on historical experience and the distribution characteristics of numerical data. For example, based on empirical values, it can be judged that, under normal circumstances, the high bits of numerical data have extremely strong similarities and small fluctuations, and the length of a single numerical data can be obtained based on this. For example, binary numerical data can be segmented into fixed lengths, and the highest bit of each data block can be obtained to obtain new binary numerical data, and the true length of the binary numerical data can be determined by the "entropy" of each binary numerical data obtained after segmentation. For example, the segmentation length with the lowest "entropy" of the binary numerical data is the true length of the numerical data.

[0076] In the present application, the prediction model of machine learning is obtained based on model training, and the training data set of numerical data includes at least one of the following information: type information of numerical data, length information of numerical data, and big and small end information of numerical data. Exemplarily, the model can be trained first. For example, in the model training stage, the label can be set to the length of the numerical data, the type of the numerical data, and the big and small end information of the numerical data. Assuming that the length of the numerical data has three lengths of 2 bytes, 4 bytes, and 8 bytes, combined with the big end, little end, and metadata type of the numerical data, the prediction model is obtained by pre-training the binary numerical data with a known format in advance using a naive Bayes model. In the model reasoning stage, the binary numerical data of any format and any distribution law can be inferred to directly obtain the format corresponding to the binary numerical data.

[0077] In this application, the specific process or method of model training is not limited. For example, the model can be trained using existing standard supervised training or unsupervised training.

[0078] For example, any module that can predict the format of numerical data can be deployed or added. It can also be understood that as long as a model or module can be used to predict the format of numerical data, it can be used in the solution of this application.

[0079] Specifically, when using a prediction model to predict the format of binary numerical data, in order to speed up the process, the binary numerical data can be randomly sampled first. For example, the binary numerical data can be randomly sampled to obtain first numerical data, and the format of the first numerical data can be predicted using various prediction models. Then, the format of the entire binary numerical data can be determined based on the format of the predicted first numerical data. For example, assuming that the entire binary numerical data is "01110001011100010111000101110001", and the first numerical data obtained by random sampling is "01110001", the first numerical data is predicted to determine its format as: integer, 1 byte, big endian. For another example, the length of the random sampling is 4KB.

[0080] In one possible implementation, for binary numeric data in the same data stream, various prediction models may predict the same format. For example, for binary numeric data in a data stream, both the technical expert prediction model and the machine learning prediction model predict the same format: integer, 4 bytes, little endian.

[0081] In another possible implementation, for binary numeric data in the same data stream, the formats predicted by various prediction models may be different. For example, for the binary numeric data "1234" in the same data stream, the technical expert prediction model predicts that its corresponding format is: integer, 2 bytes, big endian, that is, the numeric data should be "12,34", which can also be understood as the two values ​​of the numeric data, "12" and "34". However, the machine learning prediction model predicts that its corresponding format is: integer, 4 bytes, little endian, that is, the numeric data should be "4321", which can also be understood as the value represented by the numeric data is "4321". For example, two prediction models predict two different formats respectively; for another example, three prediction models predict two different formats, of which two prediction models predict the same format.

[0082] Step 303: compress the numerical data in each data stream using a compression algorithm according to the predicted format of the numerical data in each data stream.

[0083] In this application, each format corresponds to at least one compression algorithm, which can also be understood as a mapping relationship between the format of numerical data and the compression algorithm.

[0084] For example, for integer data, assume that format #1 is: integer, 2 bytes, big endian; format #2 is: integer, 2 bytes, little endian; format #3 is: integer, 4 bytes, big endian; format #4 is: integer, 4 bytes, little endian; format #5 is: integer, 8 bytes, big endian; and format #6 is: integer, 8 bytes, little endian. Format #1 corresponds to two compression algorithms, namely, compression algorithm #1 and compression algorithm #2; format #2 corresponds to two compression algorithms, namely, compression algorithm #1 and compression algorithm #3; format #3 corresponds to three compression algorithms, namely, compression algorithm #1, compression algorithm #2, and compression algorithm #3; format #4 corresponds to four compression algorithms, namely, compression algorithm #1, compression algorithm #2, compression algorithm #3, and compression algorithm #4; format #5 corresponds to two compression algorithms, namely, compression algorithm #4 and compression algorithm #5; and format #6 corresponds to three compression algorithms, namely, compression algorithm #1, compression algorithm #4, and compression algorithm #6, as shown in Table 1 below.

[0085] Table 1

[0086] Compression algorithms #1 to #6 in the above table #1 can be, for example, the compression algorithms in the above examples, without limitation.

[0087] It should be noted that although the compression algorithms corresponding to different formats in Table 1 may overlap, since the type, length, big and small ends, and distribution rules of each format are not exactly the same, although the same compression algorithm is used, the lengths of the split binary numerical data are different. Therefore, the binary numerical data obtained in the processes of "determining the predicted value", "determining the residual", and "squeezing away zeros" are completely different.

[0088] For example, the format of the predicted numerical data may simply include the length of the numerical data. For example, format #a is 2 bytes, format #b is 4 bytes, and format #c is 8 bytes. For example, format #a corresponds to one compression algorithm, sprintz. For example, format #b corresponds to four compression algorithms, sprintz, FPC, RLE, and Rice. For another example, format #c corresponds to two compression algorithms, SPDP and LZO, as shown in Table 2 below.

[0089] Table 2

[0090] In the present application, at least one compression algorithm corresponding to each format may be pre-stored in the computing device, for example, each format corresponds to an algorithm repository.

[0091] This application proposes the use of multiple prediction models and compression algorithms to achieve optimal results for a variety of binary numerical data with different data distribution patterns. Specifically, on the one hand, multiple prediction models enable the inference of the format of the binary numerical data from multiple perspectives, thereby ensuring accurate data format identification; on the other hand, the design of corresponding compression algorithms for each format enables targeted processing of the binary numerical data.

[0092] As mentioned above, in one possible implementation, if the formats predicted by various prediction models for binary numerical data of the same data stream are the same, assuming that they are all format #1 (an example of the first format), then based on Table 1, it can be determined that format #1 corresponds to two algorithms, so the binary numerical data can be compressed according to compression algorithm #1 and compression algorithm #2 respectively, and then the compression effects of the two compression algorithms are compared to determine the compression algorithm with better compression effect, and finally the compression algorithm is selected to compress the binary numerical data. Specifically, during execution, for example, the sampled numerical data can be preprocessed according to the various compression algorithms corresponding to the predicted format, and the compression index of the sampled numerical data after compression by each compression algorithm can be compared to finally determine the most suitable compression algorithm, and then the compression algorithm is used to compress the entire numerical data.

[0093] In this application, "compression metrics" may refer to, for example, compression speed, compression ratio (also known as "compression ratio"), compression efficiency, and the amount of compressed numerical data (also known as "entropy"). The compression algorithm ultimately selected has good compression metrics, which can be understood as having a faster compression speed, a higher compression ratio, a higher compression efficiency, and a smaller amount of compressed numerical data.

[0094] As previously mentioned, in another possible implementation, if different prediction models predict different formats for binary numerical data in the same data stream, for example, three prediction models are used to predict two formats for the binary numerical data in the same data stream. The format of the binary numerical data predicted by prediction model #1 is format #2, the format of the binary numerical data predicted by prediction model #2 is format #3, and the format of the binary numerical data predicted by prediction model #3 is format #4. Because the formats of the binary numerical data predicted by different prediction models are different, the binary numerical data can be compressed based on at least one compression algorithm corresponding to each format. For example, based on Table 1, it can be determined that format #2 corresponds to two compression algorithms and format #3 corresponds to three compression algorithms. Therefore, the binary numerical data can be compressed using the corresponding compression algorithm for each format to determine which compression algorithm has the best compression effect. The format and compression algorithm corresponding to the binary numerical data can then be determined. For example, compression algorithm #3 corresponding to format #3 can ultimately be selected to achieve the best compression effect on the binary numerical data. Specifically during execution, for example, the sampled numerical data can be preprocessed according to the various compression algorithms corresponding to the predicted formats, and the compression indicators of the sampled numerical data after compression by each compression algorithm can be compared to finally determine the most suitable format and the most suitable compression algorithm for the format, and then the format and the compression algorithm can be used to compress the entire numerical data.

[0095] Specifically, when each compression algorithm is used to compress the binary, for example, each step of the sprintz compression algorithm described above may be included.

[0096] Optionally, the binary numerical data compressed by the compression algorithm corresponding to the finalized format may be further compressed, for example, by using the open source compression algorithm Zstandard (Zstd) level 3.

[0097] Based on the above scheme, this application uses a prediction model to predict the format of the binary numerical data of each input data stream, and compresses the binary numerical data using at least one algorithm corresponding to the predicted format. Based on the compression effect of each compression algorithm, the format of the binary numerical data in the data stream and the compression algorithm used are ultimately determined. In this application, it is no longer necessary to parse the file to obtain the format of the numerical data. Numerical data of various formats or with any distribution pattern can be compressed using the compression algorithm corresponding to the format, achieving the versatility of numerical data compression, applicable to complex scenarios, meeting business needs, and improving the user experience.

[0098] It should be understood that the predefined in the present application can be understood as defined, predefined, stored, pre-stored, pre-negotiated, pre-configured, solidified, or pre-burned.

[0099] It should be understood that the term "and / or" in this document simply describes an association between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the related objects are in an "or" relationship.

[0100] Those skilled in the art should be aware that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0101] In the embodiment of the present application, the computing device can be divided into functional modules according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation. The following is an example of dividing each functional module corresponding to each function.

[0102] FIG4 is a schematic block diagram of a computing device 100 according to an embodiment of the present application. As shown in the figure, the computing device 100 may include: an acquisition module 110 , a prediction module 120 , and a compression module 130 .

[0103] Wherein, the acquisition module is used to acquire multiple data streams, each of the multiple data streams contains binary numerical data; the prediction module is used to predict the format of the numerical data contained in each data stream according to at least one prediction model, each prediction model of the at least one prediction model is used to predict the format of the numerical data, the input of each prediction model is the numerical data, and the output of each prediction model is the format of the numerical data, and the format of the numerical data includes at least one of the following: the type of numerical data, the length of the numerical data, and the big and small ends of the numerical data; the compression module is used to compress the numerical data in each data stream using a compression algorithm according to the predicted format of the numerical data in each data stream.

[0104] In one possible implementation, the prediction module is used to predict the format of the numerical data contained in each data stream based on at least one prediction model, including: the prediction module is used to randomly sample the numerical data in each data stream to obtain first numerical data, which is part of the numerical data in each data stream; the prediction module is used to predict the format of the first numerical data contained in each data stream based on the at least one prediction model; the prediction module is used to predict the format of the numerical data contained in each data stream based on the predicted format of the first numerical data.

[0105] In one possible implementation, the format of the first numerical data is a first format, and the compression module is used to compress the numerical data using a compression algorithm based on the predicted format of the numerical data in each data stream, including: the compression module is used to determine at least one compression algorithm corresponding to the first format; the compression module is used to compress the first numerical data respectively according to the at least one compression algorithm to obtain at least one compressed first numerical data; the compression module is used to determine the compression index corresponding to each of the at least one compressed first numerical data, and determine a first compression algorithm from the at least one compression algorithm based on the compression index; the compression module is used to compress the numerical data in each data stream according to the first compression algorithm.

[0106] In one possible implementation, the prediction module is used to predict the format of the first numerical data contained in each data stream based on at least one prediction model, including: the prediction module is used to predict at least two formats corresponding to the first numerical data contained in each data stream in the multiple data streams based on at least two prediction models.

[0107] In one possible implementation, the compression module is used to compress the numerical data in each data stream using a compression algorithm based on the predicted format of the numerical data in each data, including: the compression module is used to determine at least one compression algorithm corresponding to each of the at least two formats; the compression module is used to compress the first numerical data respectively according to the at least one compression algorithm corresponding to each format to obtain at least two compressed first numerical data; the compression module is used to determine the compression effect corresponding to each of the at least two compressed first numerical data, and according to the compression effect, determine the first format corresponding to the first numerical data and the first compression algorithm corresponding to the first format in the at least two formats; the compression module is used to compress the numerical data in each data stream according to the first format and the first compression algorithm corresponding to the first format.

[0108] It should also be understood that the apparatus 100 herein is embodied in the form of a functional unit. The term "unit" herein may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (e.g., a shared processor, a dedicated processor, or a group processor, etc.) and memory for executing one or more software or firmware programs, incorporating logic circuits, and / or other suitable components that support the described functionality.

[0109] The apparatus 100 of each of the above-described solutions has the function of implementing the corresponding steps of the above-described method 300. These functions can be implemented via hardware, or by hardware executing corresponding software implementations. The hardware or software includes one or more modules corresponding to the above-described functions; for example, the processing unit can be replaced by a processor to perform the transceiver operations and related processing operations in each method embodiment. Furthermore, the processing unit can be a processing circuit.

[0110] It should be noted that the device in FIG4 can be the computing device in the aforementioned method embodiment, or can be a chip or chip system of the computing device, such as a system on chip (SoC). The processing unit is a processor, microprocessor, or integrated circuit integrated on the chip. This is not limited here.

[0111] Figure 5 is a schematic block diagram of another computing device 200 provided in an embodiment of the present application. As shown in the figure, the device 200 includes: at least one processor 220. The processor 220 is coupled to a memory and is configured to execute instructions stored in the memory to send and / or receive signals. Optionally, the device 200 also includes a memory 230 for storing instructions. Optionally, the device 200 also includes a transceiver 210, and the processor 220 controls the transceiver 210 to send and / or receive signals.

[0112] It should be understood that the processor 220 and memory 230 may be combined into one processing device, and the processor 220 is used to execute the program code stored in the memory 230 to implement the above functions. In specific implementations, the memory 230 may also be integrated into the processor 220 or independent of the processor 220.

[0113] It should also be understood that the transceiver 210 may include a transceiver (or receiver) and a transmitter (or transmitter). The transceiver may further include an antenna, and the number of antennas may be one or more. The transceiver 210 may also be a communication interface or interface circuit.

[0114] Specifically, the processor 220 in the device 200 may correspond to the acquisition module 110 , the prediction module 120 , and the compression module 130 in the device 100 .

[0115] As a solution, the apparatus 200 is used to implement the steps in the above method 300 embodiment.

[0116] For example, the processor 220 is configured to execute computer programs or instructions stored in the memory 230 to implement the various steps in the above method 300 .

[0117] It should be understood that the specific process of each transceiver and processor executing the above corresponding steps has been described in detail in the above method embodiment, and for the sake of brevity, it will not be repeated here.

[0118] During implementation, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor or by instructions in the form of software. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it will not be described in detail here.

[0119] It should be noted that the processor in the embodiments of the present application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiment can be completed by hardware integrated logic circuits in the processor or by software instructions. The above processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.

[0120] It is understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous-link DRAM (SLDRAM), and direct RAM-bus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0121] According to the method provided in the embodiment of the present application, the present application also provides a computer program product, which stores computer program code. When the computer program code is run on a computer, the computer executes the steps in the embodiment of method 300.

[0122] According to the method provided in the embodiment of the present application, the present application also provides a computer-readable medium, which stores program code. When the program code runs on a computer, the computer executes the steps in the embodiment of the above method 300.

[0123] The explanation of the relevant contents and beneficial effects of any of the above-mentioned devices can be referred to the corresponding method embodiments provided above, which will not be repeated here.

[0124] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DVD)), or a semiconductor medium (eg, a solid state disc (SSD)).

[0125] In each of the above-mentioned device embodiments, the corresponding modules or units perform the corresponding steps. For example, the transceiver unit (transceiver) performs the receiving or sending steps in the method embodiments, and other steps except sending and receiving can be performed by the processing unit (processor). The functions of the specific units can be referred to in the corresponding method embodiments. There can be one or more processors.

[0126] As used in this specification, the terms "component," "module," "system," and the like are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or a computer. By way of illustration, both an application running on a computing device and a computing device can be a component. One or more components can reside in a process and / or an execution thread, and a component can be located on a computer and / or distributed between two or more computers. In addition, these components can be executed from various computer-readable media having various data structures stored thereon. Components can communicate, for example, via local and / or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component on a local system, a distributed system, and / or a network, such as the Internet interacting with other systems via signals).

[0127] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0128] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0129] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0130] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0131] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0132] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0133] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for compressing numerical data, It is characterized in that The method comprises: Acquire multiple data streams, each of the multiple data streams containing binary numerical data; Predicting the format of the numerical data contained in each data stream according to at least one prediction model, each prediction model in the at least one prediction model is used to predict the format of the numerical data, the input of each prediction model is the numerical data, and the output of each prediction model is the format of the numerical data, wherein the format of the numerical data includes at least one of the following: the type of the numerical data, the length of the numerical data, and the big and small ends of the numerical data; According to the predicted format of the numerical data in each data stream, a compression algorithm is used to compress the numerical data in each data stream.

2. The method according to claim 1, It is characterized in that The predicting the format of the numerical data contained in each data stream according to at least one prediction model includes: Randomly sampling the numerical data in each data stream to obtain first numerical data, wherein the first numerical data is partial numerical data of the numerical data in each data stream; Predicting a format of the first numerical data included in each data stream according to the at least one prediction model; According to the predicted format of the first numerical data, the format of the numerical data included in each data stream is predicted.

3. The method according to claim 2, It is characterized in that The format of the first numerical data is a first format, The method of compressing the numerical data in each data stream by using a compression algorithm according to the predicted format of the numerical data in each data stream comprises: determining at least one compression algorithm corresponding to the first format; Compress the first numerical data respectively according to the at least one compression algorithm to obtain at least one compressed first numerical data; Determine a compression index corresponding to each of the at least one compressed first numerical data, and determine a first compression algorithm from the at least one compression algorithm according to the compression index; Each of the numerical data in each of the data streams is compressed according to the first compression algorithm.

4. The method according to claim 2, It is characterized in that The predicting, according to at least one prediction model, the format of the first numerical data contained in each data stream comprises: Predicting, according to at least two prediction models, that the first numerical data contained in each data stream corresponds to at least two formats.

5. The method according to claim 4, It is characterized in that The method of compressing the numerical data in each data stream by using a compression algorithm according to the predicted format of the numerical data in each data stream comprises: Determining at least one compression algorithm corresponding to each of the at least two formats; According to the at least one compression algorithm corresponding to each format, respectively compress the first numerical data to obtain at least two compressed first numerical data; Determine compression indices corresponding to the at least two compressed first numerical data, and determine, according to the compression indices, a first format corresponding to the first numerical data and a first compression algorithm corresponding to the first format in the at least two formats; The numerical data in each data stream is compressed according to the first format and a first compression algorithm corresponding to the first format.

6. The method according to any one of claims 1 to 5, It is characterized in that The at least one prediction model includes: a technical expert prediction model and / or a machine learning prediction model.

7. The method according to claim 6, It is characterized in that The machine learning prediction model is obtained based on model training, and the training data set of the numerical data includes at least one of the following information: type information of the numerical data, length information of the numerical data, and big and small end information of the numerical data.

8. A computing device, It is characterized in that include: Get the module, prediction module, and compression module, where: The acquisition module is used to acquire multiple data streams, each of which contains binary numerical data; The prediction module is used to predict the format of the numerical data contained in each data stream according to at least one prediction model, each prediction model in the at least one prediction model is used to predict the format of the numerical data, the input of each prediction model is the numerical data, the output of each prediction model is the format of the numerical data, and the format of the numerical data includes at least one of the following: the type of the numerical data, the length of the numerical data, and the big and small ends of the numerical data; The compression module is used to compress the numerical data in each data stream by using a compression algorithm according to the predicted format of the numerical data in each data stream.

9. The computing device according to claim 8, It is characterized in that The prediction module is used to predict the format of the numerical data contained in each data stream according to at least one prediction model, including: The prediction module is used to randomly sample the numerical data in each data stream to obtain first numerical data, where the first numerical data is part of the numerical data in each data stream; The prediction module is used to predict the format of the first numerical data contained in each data stream according to the at least one prediction model; The prediction module is used to predict the format of the numerical data contained in each data stream according to the predicted format of the first numerical data.

10. The computing device according to claim 9, It is characterized in that The format of the first numerical data is a first format, The compression module is used to compress the numerical data using a compression algorithm according to the predicted format of the numerical data in each data stream, including: The compression module is used to determine at least one compression algorithm corresponding to the first format; The compression module is used to compress the first numerical data according to the at least one compression algorithm to obtain at least one compressed first numerical data; The compression module is used to determine the compression index corresponding to each of the at least one compressed first numerical data, and determine the first compression algorithm from the at least one compression algorithm according to the compression index; The compression module is used to compress the numerical data in each data stream according to the first compression algorithm.

11. The computing device according to claim 9, It is characterized in that The prediction module is used to predict the format of the first numerical data contained in each data stream according to at least one prediction model, including: The prediction module is used to predict the first numerical data included in each data stream of the multiple data streams according to at least two prediction models. The numerical data corresponds to at least two formats.

12. The computing device according to claim 11, It is characterized in that The compression module is used to compress the numerical data in each data stream using a compression algorithm according to the predicted format of the numerical data in each data, including: The compression module is used to determine at least one compression algorithm corresponding to each of the at least two formats; The compression module is used to compress the first numerical data according to the at least one compression algorithm corresponding to each format, so as to obtain at least two compressed first numerical data; The compression module is used to determine the compression effects corresponding to the at least two compressed first numerical data, and determine, according to the compression effects, a first format corresponding to the first numerical data and a first compression algorithm corresponding to the first format in the at least two formats; The compression module is used to compress the numerical data in each data stream according to the first format and a first compression algorithm corresponding to the first format.

13. A computing device according to any one of claims 8 to 12, It is characterized in that The at least one prediction model includes: a technical expert prediction model and / or a machine learning prediction model.

14. The computing device according to claim 13, It is characterized in that The machine learning prediction model is obtained based on model training, and the training data set of the numerical data includes at least one of the following information: type information of the numerical data, length information of the numerical data, and big and small end information of the numerical data.

15. A computing device, It is characterized in that The method comprises a processor and a memory, wherein the processor runs instructions in the memory, so that the processor performs the method according to any one of claims 1 to 7.

16. A chip, It is characterized in that include: A processor and a data interface, wherein the processor reads instructions stored in the memory through the data interface, so that the chip executes the method as claimed in any one of claims 1 to 7.

17. A computer program product comprising instructions, It is characterized in that The method comprises computer program instructions, which, when executed by the computing device, cause the device to perform the method according to any one of claims 1 to 7.

18. A computer-readable storage medium, It is characterized in that The method comprises computer program instructions which, when executed by a computing device, cause the device to perform the method as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data compression method and data decompression method, device and equipment

    CN111061722A

  • Numeric data compression method and system based on bitwise variable-length storage

    CN112527754A

  • Data compression method and computing equipment

    CN113055017A

  • Floating point data set compression

    US20200091930A1

Cited By

  • Remote monitoring method and system for natural convection constant temperature test box

    CN119922435A