Numerical data compression method and computing device
By predicting the numerical data format through a prediction model and selecting an appropriate compression algorithm, it 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.
Patent Information
- Application Number
- CN202310319119.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-22
- Publication Date
- 2024-09-24
AI Technical Summary
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.
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.
It achieves the versatility of numerical data compression in complex scenarios, improves user experience and compression effects, and meets business needs.
Smart Images

Figure CN118694375A
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of numerical data compression, and more specifically to a method and computing device for numerical data compression. Background Art
[0002] For the compression of numerical data, when using the classic compression algorithm to compress the numerical data, on the one hand, it is necessary to clarify the format of the numerical data, and on the other hand, the numerical data needs to meet a specific distribution law, so that the compression effect of the data will be better. For example, when using the classic compression algorithm to compress the numerical data, it is necessary to first clarify the type of the numerical data, such as short integer (short), integer (int), long integer (long), or floating point (float), etc.; and it is also necessary to clarify the length of the numerical data, for example, the length of byte numerical data is 8 bits, the length of integer numerical data is 8 bits and 16 bits, the length of floating point data is 16 bits and 32 bits, etc., and the classic compression algorithm can be used for compression only after the format of the numerical data is determined. For another example, the current compression algorithm has a better effect when compressing two adjacent relatively similar numerical data.
[0003] At present, in one possible way, the format of the numerical data in the data stream can be obtained by parsing the file format in the data stream. Considering the cost of computer hardware and other aspects, 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. Usually, the file formats contained in the first few data streams are parsed to obtain the format of the numerical data, and then the corresponding compression algorithm is used based on the format of the numerical data to uniformly compress the numerical data in all the subsequent data streams. It can be seen that this method is actually only suitable for applications in small scale or single scenarios.
[0004] However, in actual applications, there are many production environments and scenarios that need to be supported. In complex scenarios, the format of the numerical data contained in each data stream may be different. The existing compression method cannot meet business needs in complex scenarios, that is, it cannot meet business needs well. Therefore, a method for compressing numerical data is needed to meet the needs of actual applications. Summary of the invention
[0005] 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. It is no longer necessary to obtain the format of the numerical data by parsing the file, thereby realizing the versatility of numerical data compression and improving the user experience.
[0006] 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 implement the numerical data compression function, or it can also be executed by a component (for example, a chip or a circuit) of a module that can implement the numerical data compression function in a chip, without limitation.
[0007] The method includes: obtaining multiple data streams, each of which contains binary numerical data; predicting the format of the numerical data contained in each of the multiple data streams according to at least one prediction model, each 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, 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 large and small ends of the numerical data; according to the predicted format of the numerical data in each of the data streams, using a compression algorithm to compress the numerical data in each of the data streams.
[0008] The "data stream" in this application may be, for example, a byte stream, a character stream, or may be, for example, a plurality of "data files".
[0009] The term "numeric data" in this application may also be replaced by "numeric data". For example, numeric data may include integers (int), floating point numbers (float), decimals (decimal), fractions, and complex numbers. Integers and floating point numbers are commonly used.
[0010] 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, and any model that can predict the format of binary numerical data can be used in the solution of this application.
[0011] For example, the prediction model of machine learning is obtained based on model training, and the training data set 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. 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.
[0012] It should be understood that the "compression algorithm" in this application can be understood as a compression algorithm corresponding to or adapted to the numerical data. For example, if the format of the numerical data is 2 bytes and integer, the compression algorithm suitable for the format can be used to compress the numerical data.
[0013] Based on the above technical solution, in the present application, the format of the binary numerical data input into each data stream is predicted by at least one prediction model, and the format corresponding to 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 can be determined for the numerical data in each data stream, it is suitable for compression of numerical data in complex scenarios, thus realizing the universality of numerical data compression, meeting business needs and improving user experience.
[0014] In one possible implementation, 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 the format of the first numerical data contained in each data stream according to the at least one prediction model; and predicting the format of the numerical data contained in each data stream according to the predicted format of the first numerical data.
[0015] 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 first randomly sampled, and then the sampled numerical data can be predicted and the format of the entire binary numerical data can be inferred, thereby improving efficiency.
[0016] In a possible implementation, the format of the first numerical data is a first format, and 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 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 a 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 according to the compression index; and compressing each numerical data in each data stream according to the first compression algorithm.
[0017] In the present 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.
[0018] Based on the above scheme, the present application proposes that the format of the sampled numerical data can be predicted first. If the formats predicted by various models are the same, the compression algorithms corresponding to the format can be used to process the numerical data first. 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.
[0019] 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.
[0020] In a 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; compressing the numerical data in each data stream according to the first format and the first compression algorithm corresponding to the first format.
[0021] Based on the above scheme, the present application proposes that the format of the sampled numerical data can be predicted first. If the formats of the sampled numerical data predicted by multiple prediction models are different, the sampled numerical data can be compressed once using the predicted multiple formats and the compression algorithms corresponding to the multiple formats. The best-adapted format and one of the compression algorithms for the format can be determined based on the compression index after compression. This can ensure the selection of an adaptive compression algorithm and reduce compression time.
[0022] The present application proposes to use multiple prediction models and multiple compression algorithms, which can achieve the best effect when compressing various numerical data with different data distribution patterns. Specifically, on the one hand, multiple prediction models make it possible to infer the format of the binary numerical data from multiple angles, thereby ensuring accurate identification of the data format; on the other hand, the corresponding compression algorithm is designed specifically for each format, which can achieve targeted processing of the binary numerical data. Based on this solution, the processing effect of the binary numerical data can be guaranteed.
[0023] In a second aspect, a computing device is provided, the device being used to execute the method in 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, for executing the method in any possible implementation of the first aspect.
[0024] 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; the processing unit may be at least one processor. Optionally, the transceiver may be a transceiver circuit. Optionally, the input / output interface may be an input / output circuit.
[0025] In another implementation, the device is a chip, a chip system or a circuit of a computing device for implementing a numerical data compression function in a chip. When the device is a chip, a chip system or a circuit of a device for a numerical data compression function, the communication unit may be an input / output interface, an interface circuit, an output circuit, an input circuit, a pin or a related circuit on the chip, the chip system or the circuit; the processing unit may be at least one processor, a processing circuit or a logic circuit.
[0026] In a third aspect, a computing device is provided, the device comprising: at least one processor, configured to execute a computer program or instruction stored in a memory, so as to execute the method in any possible implementation of the first aspect. Optionally, the device further comprises a memory, configured to store a computer program or instruction. Optionally, the device further comprises a communication interface, and the processor reads the computer program or instruction stored in the memory through the communication interface.
[0027] In one implementation, the apparatus is a numerical data compression function computing device used in a chip.
[0028] In another implementation, the device is a chip, a chip system or a circuit for numerical data compression function in a chip.
[0029] 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 used to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method in any possible implementation of any aspect of the first aspect.
[0030] In the specific implementation process, the processor can be one or more chips, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a trigger, and various logic circuits. The input signal received by the input circuit can be received and input by, for example, but not limited to, a transceiver, and the signal output by the output circuit can be, for example, but not limited to, output to a transmitter and transmitted by the transmitter, and the input circuit and the output circuit can be the same circuit, which is used as an input circuit and an output circuit at different times. The embodiments of the present application do not limit the specific implementation methods of the processor and various circuits.
[0031] For the operations such as sending and acquiring / receiving involved in the processor, unless otherwise specified, or unless they conflict with their actual function or internal logic in the relevant description, they can be understood as operations such as processor output, reception, input, etc., or as sending and receiving operations performed by the radio frequency circuit and antenna, and this application does not limit this.
[0032] In a fifth aspect, a processing device is provided, comprising a processor and a memory. The processor is used to read instructions stored in the memory, and can receive signals through a transceiver and transmit signals through a transmitter to execute the method in any possible implementation of the first aspect.
[0033] Optionally, the number of the processors is one or more, and the number of the memories is one or more.
[0034] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0035] 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 respectively. The embodiments of the present application do not limit the type of memory and the setting method of the memory and the processor.
[0036] It should be understood that the related data interaction process, such as sending indication information, can be a process of outputting indication information from the processor, and receiving capability information can be a process of receiving input capability information by the processor. Specifically, the data output by the processor can be output to the transmitter, and the input data received by the processor can come from the transceiver. Among them, the transmitter and the transceiver can be collectively referred to as a transceiver.
[0037] The processing device in the fifth aspect may be one or more chips. The processor in the processing device may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory, which may be integrated in the processor or located outside the processor and exist independently.
[0038] 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 described above.
[0039] In a seventh aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute a method in any possible implementation of the first aspect.
[0040] 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 manner in the above-mentioned first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a schematic diagram of a system architecture applicable to the present application.
[0042] Figure 2 It is a schematic diagram of compressing numerical data using an existing compression algorithm.
[0043] Figure 3 It is a schematic flow chart of a method 300 for compressing numerical data provided by the present application.
[0044] Figure 4 It is a schematic block diagram of a computing device 100 provided in the present application.
[0045] Figure 5 It is a schematic block diagram of a computing device 200 provided in the present application. DETAILED DESCRIPTION
[0046] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0047] The term "numeric data" in this application may also be replaced by "numeric data". For example, numeric data may include integers (int), floating point numbers (float), decimals (decimal), fractions, and complex numbers. Integers and floating point numbers are commonly used.
[0048] Figure 1 This is a schematic diagram of a system architecture applicable to this application, such as Figure 1 As shown in (a) in the figure, the application can write numerical data into the computing cluster, transmit numerical data through the network, write numerical data into the cache, compress the numerical data, and finally store it in the disk (for example, a mechanical hard disk or a solid-state drive), that is, in the storage cluster. Figure 1 As shown in (b), when numerical data is transmitted between end-to-end, the numerical data can be written into the cache, and before the numerical data is stored on the disk, the numerical data needs to be compressed, and when the numerical data is read, the numerical data can be decompressed.
[0049] When compressing numerical data, when using a classic compression algorithm to compress numerical data, on the one hand, it is necessary to parse the file storing the numerical data to obtain the format of the numerical data, and on the other hand, the numerical data needs to meet a specific distribution law. For example, when using a classic compression algorithm to compress numerical data, it is first necessary to clarify whether the type of the numerical data is a short integer, an integer, a long integer, or a floating point, etc.; and it is also necessary to clarify the length of the numerical data, for example, the length of byte numerical data is 8 bits, the length of integer numerical data is 8 bits and 16 bits, and the length of floating point data is 16 bits and 32 bits; in addition, when storing, it is a big-endian storage mode or a little-endian storage mode, etc., that is, the classic compression algorithm can be used for compression only after the format of the numerical data is determined. It is worth noting that the current compression algorithm works better when compressing two adjacent relatively similar numerical data.
[0050] It should be noted that the compression algorithm in the present application may be a classic compression algorithm, for example, a sprintz compression algorithm, an FPC compression algorithm, a run length encoding (RLE) algorithm, a Huffman algorithm, a Rice algorithm, a Snappy compression algorithm, an LZ4 compression algorithm, a Simple8b compression algorithm, an LZO compression algorithm, and the like. Another example is a single precision double precision (SPDP) compression algorithm. Another example may include other non-classical algorithms, for example, other customized compression algorithms, and the like. In other words, in the present application, the compression algorithm is not limited.
[0051] Figure 2The process of compressing numerical data using the existing sprintz compression algorithm is shown. The compression algorithm is a compression algorithm for time series, for example, the algorithm is an Internet of Things time series compression algorithm. The compression algorithm mainly includes the following steps:
[0052] Step 1: Determine the predicted value
[0053] "Prediction" means: using the previous value to predict the current value. Figure 2 As shown in (a) in the figure, assuming that the value of the first row of a list is "-3,2,104", the previous value of the first row can be considered to be "0,0,0", so the predicted value is still "0,0,0". It can also be understood that the previous value is the predicted value of the current value.
[0054] Step 2: Determine the residual
[0055] 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. Figure 2 As shown in (b), 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". Similarly, 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. Figure 2 (c) shows Figure 2 The residuals corresponding to each row in (b).
[0056] Step 3: Encode the residual
[0057] For example, the "Zigzag" algorithm can be used to encode the residual. Specifically, the Zigzag algorithm refers to multiplying a positive number by 2, taking the absolute value of a negative number, then multiplying it by 2 and adding 1. Figure 2 The residual of (c) in is encoded, and the encoding result is as follows Figure 2 As shown in (d) in .
[0058] Step 4, press and remove 0
[0059] "Compress and remove 0" means: record the number of the highest bits of each encoded residual, and then remove the high-order 0s to compress. Assume Figure 2The values of (d) in the formula are all integers and are represented by 8-bit binary numbers. Figure 2 (e) in . It can be observed that Figure 2 In (e), the binary numbers in the "dX" column have the fifth highest bit "1", so the binary numbers in the "dX" column need to retain five bits from right to left; for the binary numbers in the "dY" column, they are all 0 without the highest bit 1, so the binary numbers in the "dY" column do not need to be recorded; for the binary numbers in the "dZ" column, the highest bit "1" is the first bit, so the binary numbers in the "dZ" column need to retain one bit from right to left. Specifically, 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. Furthermore, regardless of case (1) or case (2), if two bytes (i.e., 16 bits) are used for recording, since the previous header already occupies 9 bits, 7 binary bits need to be added (i.e., 16-9=7b).
[0060] The above steps 1 to 4 briefly illustrate 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 similar numerical data.
[0061] At present, in one possible way, the format of the numerical data in the data stream can be obtained by parsing the file format in the data stream. Considering the cost of computer hardware and other aspects, 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. Usually, the file formats contained in the first few data streams are parsed to obtain the format of the numerical data, and then the corresponding compression algorithm is used based on the format of the numerical data to uniformly compress the numerical data in all the subsequent data streams. It can be seen that this method is actually only suitable for applications in small scale or single scenarios.
[0062] 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. The existing compression methods cannot meet business needs in complex scenarios. For example, according to the existing methods, the following problems are 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 methods of compressing numerical data cannot meet business needs well. Therefore, a method of compressing numerical data is needed that can meet the needs of actual applications.
[0063] 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.
[0064] The solution provided by this application can be applied to scenarios with massive amounts of numerical data, such as HPC clusters such as scientific computing, serving data storage and node communication. Scenarios such as energy exploration, supercomputing centers, and meteorological and ocean simulations all have massive amounts of numerical data and all require numerical data compression.
[0065] Figure 3 is a schematic flow chart of a method 300 for compressing numerical data provided by the present application, such as Figure 3 As shown, the method includes:
[0066] Step 301: Acquire multiple data streams, each of which contains binary numerical data.
[0067] The "data stream" in this application may be, for example, a byte stream, a character stream, or may be, for example, a plurality of "data files".
[0068] In the present application, when binary numerical data is input, it can be binary numerical data of any format and any distribution rule, that is, it is not necessary to parse the file or data stream storing the numerical data to obtain the format of the numerical data.
[0069] 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.
[0070] Step 302: predict the format of the numerical data contained in each of the multiple data streams according to at least one prediction model.
[0071] 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.
[0072] In the present application, the input of each prediction model is numerical data, and the output is in the format of the numerical data.
[0073] In the present application, the technical expert prediction model can be understood as determining the format of the numerical data based on historical experience and the distribution characteristics of the numerical data. Exemplarily, based on the empirical value, it can be judged that, under normal circumstances, the high bits of the 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, the binary numerical data can be segmented into fixed lengths, 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.
[0074] In the present application, the prediction model of machine learning is obtained according to 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 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 binary numerical data of the known format in advance is pre-trained using the naive Bayes model to obtain the prediction model. In the model reasoning stage, the binary numerical data of any format and any distribution law of the input can be inferred, and the format corresponding to the binary numerical data can be directly obtained.
[0075] In the present 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.
[0076] 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 the present application.
[0077] 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 may be randomly sampled first. For example, the binary numerical data may be randomly sampled to obtain first numerical data, and the format of the first numerical data may be predicted using various prediction models, and the format of the entire binary numerical data may be determined based on the format of the predicted first numerical data. Exemplarily, 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, and its format is determined to be: integer, 1 byte, big endian. For another example, the length of the random sampling is 4KB.
[0078] In one possible implementation, for binary numeric data in the same data stream, the formats predicted by various prediction models may be the same. For example, for binary numeric data in a data stream, the technical expert prediction model and the machine learning prediction model both predict the corresponding formats as: integer, 4 bytes, little endian.
[0079] 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 the corresponding format is: integer, 2 bytes, big endian, that is, the numeric data should be "12,34", which can also be understood as the numeric data has two values, "12" and "34". However, the machine learning prediction model predicts that the 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.
[0080] 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.
[0081] In this application, each format corresponds to at least one compression algorithm. It can also be understood that there is a mapping relationship between the format of numerical data and the compression algorithm.
[0082] Exemplarily, for integer numerical 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; format #6 is: integer, 8 bytes, little endian. Among them, 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; format #6 corresponds to three compression algorithms, namely compression algorithm #1, compression algorithm #4, and compression algorithm #6, as shown in Table 1 below.
[0083] Table 1
[0084]
[0085] The compression algorithms #1 to #6 in the above table #1 may be, for example, the compression algorithms in the above examples, without limitation.
[0086] 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 "compressing to remove 0" are completely different.
[0087] Exemplarily, the format of the predicted numerical data may also only 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, there is one compression algorithm corresponding to format #a, which is sprintz. For example, there are four compression algorithms corresponding to format #b, which are sprintz, FPC, RLE, and Rice. For another example, there are two compression algorithms corresponding to format #c, which are SPDP and LZO, as shown in Table 2 below.
[0088] Table 2
[0089] Format of numeric data Compression Algorithm Format#a sprintz, RLE, Rice Format#b sprintz, FPC, RLE, Rice Format#c SPDP, LZO
[0090] In the present application, at least one compression algorithm corresponding to each format may be pre-stored in a computing device, for example, each format corresponds to an algorithm repository.
[0091] This application proposes to use multiple prediction models and multiple compression algorithms, which can achieve the best effect for various binary numerical data with different data distribution patterns. Specifically, on the one hand, multiple prediction models make it possible to infer the format of the binary numerical data from multiple angles, thereby ensuring accurate identification of the data format; on the other hand, the corresponding compression algorithm is designed specifically for each format, which can achieve targeted processing of the binary numerical data.
[0092] As mentioned above, in a 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 compression algorithms corresponding to the predicted formats, and the compression indicators of the sampled numerical data after compression by each compression algorithm are compared to finally determine the most suitable compression algorithm, and then the compression algorithm is used to compress the entire numerical data.
[0093] The "compression index" in this application may refer to, for example, compression speed, compression rate (also referred to as "compression ratio"), compression efficiency, and the amount of compressed numerical data (also referred to as "entropy"). The compression indexes of the compression algorithm finally selected are better, which can be understood as faster compression speed, higher compression rate, higher compression efficiency, and smaller amount of compressed numerical data.
[0094] As mentioned above, in another possible implementation, if the formats predicted by various prediction models for the binary numerical data of the same data stream are different. For example, three prediction models are used to predict that the binary numerical data of the same data stream has two formats. Among them, the format of the binary numerical data predicted based on prediction model #1 is format #2, the format of the binary numerical data predicted based on prediction model #2 is format #3, and the format of the binary numerical data predicted based on prediction model #3 is format #3. Since 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 once using the corresponding compression algorithm according to each format to see which format corresponds to which compression algorithm with the best compression effect, and then determine the format and compression algorithm corresponding to the binary numerical data. For example, the compression algorithm #3 corresponding to format #3 is finally selected to have the best effect when compressing the binary numerical data. Specifically, during execution, for example, the sampled numerical data can be preprocessed according to the 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 use the format and the compression algorithm 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 introduced above may be included.
[0096] Optionally, the binary numerical data compressed by the compression algorithm corresponding to the finally determined format may be further compressed, for example, by using the open source compression algorithm Zstandard (Zstd) level 3 for further compression.
[0097] Based on the above scheme, the format of the binary numerical data of each input data stream is predicted by the prediction model in this application, and the binary numerical data is compressed by at least one algorithm corresponding to the predicted format, and the format of the binary numerical data in the data stream and the compression algorithm used are finally determined based on the compression effect of each compression algorithm. In this application, it is no longer necessary to obtain the format of the numerical data by parsing the file, and it is realized that the numerical data of various formats or with any distribution law can be compressed by the compression algorithm corresponding to the format, and the universality of the compression of numerical data is realized, which is suitable for complex scenarios, meets business needs, and improves the user experience.
[0098] It should be understood that the pre-defined in the present application can be understood as defined, pre-defined, stored, pre-stored, pre-negotiated, pre-configured, solidified, or pre-burned.
[0099] It can be understood that the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after 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] The embodiment of the present application can divide the computing device 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 integrated module 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 function 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] Figure 4 1 is a schematic block diagram of a computing device 100 provided in an embodiment of the present application. As shown in the figure, the device 100 may include: an acquisition module 110, a prediction module 120, and a compression module 130.
[0103] Among them, 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 large 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 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, 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 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.
[0105] In a 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 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 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 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.
[0106] In one possible implementation, 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 at least two formats corresponding to the first numerical data contained in each data stream in the multiple data streams according to at least two prediction models.
[0107] In a 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 effects corresponding to the at least two compressed first numerical data, and according to the compression effects, 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 a memory for executing one or more software or firmware programs, a combined logic circuit, and / or other suitable components that support the described functions.
[0109] The apparatus 100 of each of the above schemes has the function of implementing the corresponding steps of the above method 300. The functions can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions; for example, the processing unit can be replaced by a processor to respectively perform the receiving and sending operations and related processing operations in each method embodiment. In addition, the processing unit can be a processing circuit.
[0110] It should be pointed out that Figure 4 The device in the above method embodiment may be a computing device, or a chip or chip system of a computing device, such as a system on chip (SoC). The processing unit is a processor or microprocessor or integrated circuit integrated on the chip. This is not limited here.
[0111] Figure 52 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 the memory and is used to execute instructions stored in the memory to send signals 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 signals and / or receive signals.
[0112] It should be understood that the processor 220 and the memory 230 can 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 implementation, the memory 230 can 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 an 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 device 200 is used to implement the steps in the above method 300 embodiment.
[0116] For example, the processor 220 is used to execute the computer program or instructions stored in the memory 230 to implement each step 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] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. 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 a 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 is not described in detail here.
[0119] It should be noted that the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (digitalsignal processor, DSP), an application-specific integrated circuit (application-specific integrated circuit, ASIC), a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor can be combined and performed. The software module can be located in a mature storage medium in the field 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 combination with its hardware.
[0120] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can 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 can 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, on which a computer program code is stored. 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 may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may 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 may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. 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 the above-mentioned various device embodiments, the corresponding steps are performed by the corresponding modules or units. For example, the transceiver unit (transceiver) performs the steps of receiving or sending in the method embodiment, and other steps except sending and receiving can be performed by the processing unit (processor). The functions of the specific units can refer to the corresponding method embodiments. Among them, there can be one or more processors.
[0126] The terms "component", "module", "system", etc. used in this specification 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 applications running on a computing device and a computing device can be components. One or more components may reside in a process and / or an execution thread, and a component may be located on a computer and / or distributed between two or more computers. In addition, these components may be executed from various computer-readable media having various data structures stored thereon. Components may, for example, communicate through local and / or remote processes according to signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system and / or a network, such as the Internet interacting with other systems through signals).
[0127] Those of ordinary skill 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 to be beyond the scope of this application.
[0128] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0129] In the several embodiments provided in the present 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 only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, 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 separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[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 can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
[0133] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for compressing numerical data, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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. The computing device according to any one of claims 8 to 12, 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, 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, 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, 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, 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, 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.
