Data compression processing method and apparatus

By forming arrays, deleting invalid values, and calculating the difference, the problem of data redundancy in the battery management system is solved, thereby reducing storage space and costs.

CN115021761BActive Publication Date: 2026-03-24GUANGZHOU XIAOPENG MOTORS TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-06
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In battery management systems, data such as cell voltage and temperature are stored in extremely long strings, which occupy a large amount of storage space and result in high storage costs.

Method used

The compression result is generated by obtaining the target field values ​​to form an array, deleting invalid values, calculating the variable values ​​of preset statistics, obtaining the difference between the field values ​​and the variable values.

Benefits of technology

The original string length was compressed, reducing storage space usage and storage costs, thus saving storage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115021761B_ABST
    Figure CN115021761B_ABST
Patent Text Reader

Abstract

The application relates to a data compression processing method and device. The method comprises the following steps: obtaining field values of target fields, and forming a first array according to the preset rule; performing statistics on the field values in the first array, and determining variable values of a preset statistical quantity; respectively obtaining the multiple difference values of the field values and the variable values in the first array; and performing compression according to the number of the field values, the variable values and the multiple difference values contained in the first array, so as to obtain the compression result of the field values of the target fields. The scheme provided by the application can compress the field content, reduce the occupied storage space and reduce the storage cost.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data compression, and particularly relates to a data compression processing method and device. BACKGROUND

[0002] A power battery is a main energy storage component of a new energy vehicle, and the power battery is generally a battery module composed of multiple battery cells. A battery management system needs to collect data of the battery module to perform charging, discharging, and safety protection operations on the battery module according to the collected data.

[0003] In the related art, the battery management system generally controls the battery module according to key information such as voltages, temperatures, and currents of the battery cells. Taking the voltage as an example, after periodically collecting the voltages of the battery cells, the related data needs to be stored in the system for monitoring. Since the number of battery cells is large, when the voltage information of all the battery cells is collected and stored, a super-long string is generated, and a large amount of information data occupies a large storage space, resulting in a large storage cost. SUMMARY

[0004] To solve or partially solve the problems in the related art, the present application provides a data compression processing method and device, which can compress field content, reduce storage space occupation, and reduce storage cost.

[0005] The first aspect of the present application provides a data compression processing method, comprising:

[0006] obtaining field values of a target field, and forming a first array according to the field values in a preset rule;

[0007] statistically determining variable values of a preset statistical quantity according to the field values in the first array;

[0008] respectively obtaining difference values of the field values and the variable values in the first array;

[0009] compressing the field values according to the number of the field values, the variable values, and the difference values in the first array to obtain a compression result of the field values of the target field.

[0010] In an embodiment, before the statistical determination of the variable values of the preset statistical quantity according to the field values in the first array, the method further comprises:

[0011] deleting the field values of a preset type located at a preset position in the first array.

[0012] In an embodiment, the statistical determination of the variable values of the preset statistical quantity according to the field values in the first array comprises:

[0013] convert the valid field values in the first array into corresponding integer field values respectively, form a second array according to the integer field values, perform statistics according to the integer field values in the second array, and determine the integer variable values of the preset statistical quantity; or

[0014] determine the variable values of the preset statistical quantity according to the valid field values in the first array, and convert the variable values into integer variable values.

[0015] In an embodiment, the respective acquisition of the difference values of the field values and the variable values in the first array comprises:

[0016] respectively subtract the integer field values in the second array from the integer variable values to obtain corresponding difference values.

[0017] In an embodiment, the respective acquisition of the difference values of the field values and the variable values in the first array comprises:

[0018] respectively subtract the valid field values in the first array from the variable values to obtain corresponding difference values;

[0019] convert the difference values into difference values.

[0020] In an embodiment, the method further comprises:

[0021] when the field values in the first array belong to invalid values, processing the invalid values according to a preset mode.

[0022] In an embodiment, the compression according to the number of field values, variable values and difference values contained in the first array to obtain the compression result of the field values of the target field comprises:

[0023] form a third array from the difference values;

[0024] splice the number of field values, variable values and the third array contained in the first array according to a preset format to generate a corresponding compression result.

[0025] The second aspect of the present application provides a data compression processing device, comprising:

[0026] an acquisition module configured to acquire field values of a target field and form a first array from the field values according to a preset rule;

[0027] a statistics module configured to perform statistics according to the field values in the first array and determine variable values of a preset statistical quantity;

[0028] a processing module configured to acquire difference values of the field values and the variable values in the first array respectively;

[0029] The output module is configured to compress the target field value according to the number of field values, the variable value and the difference value in the first array, and obtain a compression result of the target field value.

[0030] The third aspect of the present application provides an electronic device, comprising:

[0031] a processor; and

[0032] a memory having executable code stored thereon, which, when executed by the processor, causes the processor to perform the method described above.

[0033] The fourth aspect of the present application provides a computer-readable storage medium having executable code stored thereon, which, when executed by a processor of an electronic device, causes the processor to perform the method described above.

[0034] The technical solutions provided by the present application can include the following beneficial effects:

[0035] The variable value and the difference value of the target field value are obtained by statistics and calculation, compared with the traditional direct recording of the original value of the target field, the number of field values, the variable value and the difference value contained in the first array are used for representation, the length of the string of the original value is compressed, the storage space occupied by the too long string is reduced, and the storage cost is saved.

[0036] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS

[0037] The above and other objects, features and advantages of the present application will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings, in which like reference characters refer to like parts throughout the several views, and in which:

[0038] Figure 1 is a flowchart of a data compression processing method shown in an embodiment of the present application;

[0039] Figure 2 is a scatter plot of cell voltage values;

[0040] Figure 3 is another flowchart of a data compression processing method shown in an embodiment of the present application;

[0041] Figure 4 is another flowchart of a data compression processing method shown in an embodiment of the present application;

[0042] Figure 5is a structural schematic diagram of a data compression processing device shown by an embodiment of the present application.

[0043] Figure 6 is another structural schematic diagram of a data compression processing device shown by an embodiment of the present application.

[0044] Figure 7 is a structural schematic diagram of an electronic device shown by an embodiment of the present application. DETAILED DESCRIPTION

[0045] Embodiments of the present application will be described in more detail by referring to the drawings. Although embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. Rather, these embodiments are provided so that the present application is more thorough and complete, and the scope of the present application is fully conveyed to those skilled in the art.

[0046] The terms used in the present application are merely for the purpose of describing specific embodiments and are not intended to limit the present application. The singular forms "a", "an" and "the" used in the present application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0047] It should be understood that although the terms "first", "third", "third" and the like are used to describe various information in the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, the first information can also be referred to as the third information, and similarly, the third information can also be referred to as the first information without departing from the scope of the present application. Therefore, the features defined with "first", "third" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specifically limited.

[0048] In the related art, the relevant information data of each battery cell of the battery module generates an ultra-long string when stored, and a large amount of information data occupies a large storage space, resulting in a large storage cost.

[0049] To solve the above problems, the embodiments of the present application provide a data compression processing method, which can compress field content, reduce storage space occupation and reduce storage cost.

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

[0051] Figure 1 is a flowchart of a data compression processing method shown by an embodiment of the present application.

[0052] Referring to Figure 1 An embodiment of the present application shows a data compression processing method, which comprises:

[0053] S110, obtaining field values of target fields, and forming a first array according to the field values in a preset rule.

[0054] The type of the target field can be a performance characterization type of the subject matter. For example, the type of the target field can be the voltage, current, temperature, etc. of the battery cell, which is only used as an example. For the same type of target field, the corresponding values of each battery cell can be obtained as the corresponding field values. It can be understood that when the number of battery cells is more than one, the field values of some battery cells are valid values of real values, and the field values of some battery cells are invalid values represented by a reserved value, i.e. the field values of each battery cell are independently read and do not interfere with each other. In an embodiment, the reserved value can be 0 or any other value. Preferably, in order to facilitate the distinction between valid values and invalid values, the value of the reserved value can be set to a value outside the conventional value range of the valid value.

[0055] Further, after obtaining the field values of the target fields of all battery cells, each field value can be represented according to a preset format. For example, the voltage values of all battery cells are listed one by one, and a separator is used to separate each voltage value, thereby forming a first array, for example, A = 3.881, 3.887, 3.886, 3.885, 3.887, 3.887, 3.888, 3.885, 3.889, 3.888, 3.888, 3.89, 3.89, 3.886, 8.191, 8.191, 8.191, 8.191. Among them, 8.191 is a preset reserved value, which is used to represent the invalid field value of some battery cells, i.e. invalid value.

[0056] S120, according to the field values in the first array, statistics are performed to determine the variable value of the preset statistical quantity.

[0057] The preset statistical quantity can be one of the median, mode or average, for example. In this step, the specific value of the preset statistical quantity can be calculated by performing statistics on all or part of the field values in the first array, i.e. the variable value is determined.

[0058] Preferably, the median can be used as the preset statistical quantity. As Figure 2 shown, taking the voltage values of the battery cells as an example, most of the voltage values are distributed along the characteristic value of 3.81. For the field value type fluctuating along a certain characteristic value, the median can be preferably used as the preset statistical quantity, which can be beneficial to the subsequent step of compressing the field values by difference.

[0059] In order to reduce the interference of redundant data, in an embodiment, the invalid field values in the first array are deleted, and the variable values of the preset statistical quantities are determined according to the remaining field values. That is, the variable values of the preset statistical quantities such as the median of the remaining field values can be calculated after the invalid field values in the first array are deleted. For example, after the invalid field value 8.191 in the above array is deleted, the median of the remaining field values is 3.887.

[0060] S130, respectively, the difference value of the field value and the variable value in the first array is obtained.

[0061] It can be understood that the field value and the variable value are both specific numerical values, which may exist in the case of multiple decimal places. In an embodiment, the difference value can be obtained by subtracting the field value and the variable value respectively; and the difference value is amplified by the same rate to generate a corresponding integer to obtain the difference value. That is, when the field value and the variable value are both decimals, a large number of field values cause the problem of too long string due to multiple decimal places. Therefore, by amplifying the numerical value, the difference value represented by an integer instead of the original value represented by a decimal can shorten the string and reduce the occupation of memory.

[0062] Optionally, each field value and variable value can be converted into a corresponding integer, and then each integer field value is subtracted from the integer variable value to obtain the integer difference value. Alternatively, each field value and variable value of the original value can be subtracted first, and then each difference value is converted into an integer difference value.

[0063] S140, according to the number of field values, variable values and difference values contained in the first array, the compression result of the field value of the target field is obtained.

[0064] The number of field values in the first array can represent the real number of battery cells, that is, each field value corresponds to the current numerical value of the target performance of each battery cell. When the field value of the target field is obtained at different times, the numerical value of the field value may be different, that is, for the same battery cell, not every time the field value obtained is invalid. Therefore, it is very important to accurately determine the number of field values contained in the first array. In the above example of the first array, the number of field values is 18.

[0065] Further, after determining the variable value and the difference value in the current first array according to the above steps, in an embodiment, the number of field values, the variable value and the difference value contained in the first array can be spliced according to a preset format to obtain the corresponding compression result.

[0066] From the example, the technical scheme of the application obtains variable values and difference values by statistics and calculation of field values of the target field, and compared with the traditional method of recording the target field according to the original value, the application uses the number of field values contained in the first array, the variable values and the difference values to represent, which compresses the length of the original value string, reduces the storage space occupied by the long string, and saves the storage cost.

[0067] Figure 3 is another flowchart of the data compression processing method shown in the embodiments of the application.

[0068] Referring to Figure 3 , another embodiment of the application shows a data compression processing method, which includes:

[0069] S210, obtaining field values of a target field, and forming a first array according to the preset rule, wherein the number of field values in the first array is determined.

[0070] For example, the target field type of the battery module is voltage, and the field value is the voltage value. In order to quickly obtain the field value, the voltage value corresponding to each battery cell can be obtained according to the string of the battery cell voltage list. Further, in order to distinguish each field value, each two field values can be separated according to a preset separator, such as a comma. In this step, the number of field values L in the first array is the same as the real number of battery cells, and if some battery cells lack the current voltage value, a reserved value can be used instead of the corresponding field value.

[0071] For example, the first array separates each field value by a comma, which can be represented as: A = [3.881, 3.887, 3.886, 3.885, 3.887, 3.887, 3.888, 3.885, 3.889, 3.888, 3.888, 3.89, 3.89, 3.886, 8.191, 8.191, 8.191, 8.191]. Wherein, L = 18.

[0072] Optionally, in the first array, the arrangement order of each field value can be sorted according to the corresponding number of the battery cell.

[0073] S220, deleting the field value meeting the preset type located at the preset position in the first array.

[0074] It can be understood that when the first array includes more than one field value, the positions in the first array can be divided into a prefix, a middle and a suffix, for example. In this step, the field values of the preset type in the suffix position of the first array can be deleted, for example. The field value of the preset type can be a field value with an index value of a reserved value, that is, the invalid value represented by the reserved value in the first array can be deleted. For example, the reserved value in the above example is 8.191. That is, this step can delete the invalid value in the suffix position of the first array. For example, in a specific embodiment, the field values in the first array can be traversed one by one in the order from back to front, and it is determined whether the field value is a reserved value; if the field value is a reserved value, it is determined that the field value is an invalid value and is deleted, until the field value traversed is a valid value, and the deletion is stopped. For example, in the above example A, the invalid value in the suffix position is 8.191, and in this step, 4 invalid values with a value of 8.191 in the suffix can be deleted, so that the first array has 14 field values left, and the first array after deleting the invalid values is represented as A = [3.881, 3.887, 3.886, 3.885, 3.887, 3.887, 3.888, 3.885, 3.889, 3.888, 3.888, 3.89, 3.89, 3.886].

[0075] After the deletion action in this step, the number N of the field values left in the first array is less than or equal to L. That is, all the field values in the first array can be valid values, and no field value needs to be deleted.

[0076] Of course, according to actual business needs, invalid values in other positions or all positions in the first array can also be deleted, which is not limited herein.

[0077] S230, converting the valid field values in the first array into corresponding integer field values respectively, forming a second array according to the integer field values; and determining the integer variable value of the preset statistical quantity according to the integer field values in the second array.

[0078] Among them, when the valid field values in the first array are valid values, the valid values are enlarged into integer field values according to the same multiple according to the accuracy of each valid value. For example, when the valid value is 3.887, the accuracy is 0.001, and the multiple is 1000, the corresponding integer field value is 3887. When the valid value is 3.8, the accuracy is 0.1, and the multiple is 10, the corresponding integer field value is 38. Generally speaking, in the same array, the accuracy of each valid value is the same, so it is necessary to convert each valid value into a corresponding integer field value according to the same multiple.

[0079] Further, when the first array includes effective values with different precisions, the scale can be determined according to the maximum precision in the effective values to convert the integer field values to the same order of magnitude. For example, when the first array includes 3.887 and 3.89, the precisions of the two are different, and in order to ensure that the integer field values after conversion have the same order of magnitude, the same scale 1000 is used for conversion.

[0080] Further, after determining the conversion of each effective value to an integer field value, the integer field values are generated to correspond to the second array. According to the preset statistical quantity, the calculation method is determined, and thus the integer variable value corresponding to the second array is determined. Therefore, the field values in the first array of the above example are converted to integer field values according to the scale of 1000, and can be represented as B = [3881, 3887, 3886, 3885, 3887, 3887, 3888, 3885, 3889, 3888, 3888, 3890, 3890, 3886].

[0081] It can be understood that in various preset statistical quantities, the calculation methods of the mean, mode and median are different. Taking the calculation method of the median as an example, the values in the second array are arranged in order of size, and when the number of integer field values in the second array is odd, the integer field value in the middle of the arrangement is the corresponding integer variable value; when the number of integer field values in the second array is even, the average of the two integer field values in the middle of the arrangement is the corresponding integer variable value.

[0082] In order to facilitate the rapid calculation of the specific value of the preset statistical quantity, in a specific embodiment, the calculation formula of the preset statistical quantity can be set in advance. For example, when the preset statistical quantity of the second array B is the median M, M = (B[len(B) / / 2] + B[~len(B) / / 2]) / 2, that is, the median of the above second array B is 3887.

[0083] Alternatively, the determination method of the integer variable value is not limited to the above method, for example, in other embodiments, according to the effective field values in the first array, the variable value of the preset statistical quantity is determined; and the variable value is converted to an integer variable value. That is, according to the field values after the invalid values are deleted in step S220, the variable value corresponding to each effective value can be calculated directly according to the calculation method of the preset statistical quantity, such as the median. For example, the median variable value of the first array in step S220 is 3.887. By amplifying 3.887 according to the scale 1000, the integer variable value 3887 can be obtained.

[0084] S240, the integer field values in the second array are respectively subtracted from the integer variable value to obtain the corresponding difference value.

[0085] It should be noted that, in order to ensure the uniformity of the calculation results, the integer field values can be subtracted by the integer variable values to obtain the corresponding difference values. Alternatively, the integer variable values can be subtracted by the integer field values to obtain the corresponding difference values.

[0086] In an embodiment, when the field values in the first array belong to invalid values, the invalid values are processed in a preset manner. That is, if all invalid values are not deleted in step S220, that is, there are both valid values and invalid values in the first array, the valid values in the second array have been converted into integer field values, and the remaining invalid values are still the original values. Alternatively, in this step, the invalid values are converted into empty strings, that is, without subtracting the invalid values from the integer variable values, the invalid values can be directly displayed as empty.

[0087] S250, the difference values form a third array; the number of field values contained in the first array, the integer variable value and the third array are spliced to generate a corresponding compression result according to a preset format.

[0088] In an embodiment, the difference values are sorted according to the arrangement order of the field values in the first array to generate the third array C. Such design facilitates the restoration of the corresponding field values according to the difference values when reading.

[0089] Further, in an embodiment, the number of field values contained in the first array, the integer variable value and the third array are spliced to form a compression result according to a preset format for storage. It should be understood that, in order to reduce characters as much as possible, the integer variable value is directly used instead of the variable value in the compression result.

[0090] For example, the preset format can be: compression result = cell number L + ‘#’ + median M + ‘#’ + ‘,’.join(C).replace(‘,-’,‘-’). For example, the compression result of the above example is 18#3887#-6,0,-1,-2,0,0,1,-2,2,1,1,3,3,-1. Obviously, the string length of the first array A in step S210 is 105 characters, and the string length of the compression result is 40 characters, and the compression rate = 40 / 105 = 38.1%. It can be understood that, according to such compression result for storage, the compression advantage of big data in columnar storage mode is adaptively utilized.

[0091] Further, when reading the compression result, the downstream “battery diagnosis and analysis” system can quickly restore by using the corresponding decompression UDF function, so as to obtain the original value, that is, the field value in the first array, so as to perform diagnosis and analysis of the battery and visual display of the fault.

[0092] From the example, the data compression processing method of the application can process the data in the original string by deleting invalid values, enlarging to integers, and reducing characters by difference, and the like, so that the compression result is expressed in fewer characters, saving storage space. At the same time, such compression result is easy to restore and read, ensuring that the data processing efficiency is not affected. The method of the application is especially suitable for the compression processing of various single sensors when storing long strings, and is also suitable for the compression processing of digital lists.

[0093] Figure 4 is another flow diagram of a data compression processing method according to another embodiment of the application.

[0094] Referring to Figure 4 , the data compression processing method according to another embodiment of the application includes:

[0095] S310, obtaining field values of a target field, and forming a first array according to the field values in a preset rule, wherein the number of field values in the first array is determined.

[0096] S320, deleting field values of a preset type located at a preset position in the first array.

[0097] S330, determining variable values of a preset statistical quantity according to the valid field values in the first array.

[0098] The difference between this embodiment and the above-mentioned embodiments is that in this step, the field values do not need to be converted into integer field values, and the variable values are obtained by calculating according to the selected calculation method corresponding to the preset statistical quantity. The obtained variable values do not need to be converted into integer variable values. For example, the median corresponding to the first array A in step S220 is 3.887 in this step.

[0099] S340, subtracting the valid field values in the first array from the variable values respectively to obtain corresponding difference values; and converting the difference values into multiple difference values.

[0100] In this step, each valid value in the first array A is subtracted from the above-mentioned median 3.887, so that the corresponding difference values -0.006, 0, -0.001, -0.002, 0, 0, 0.001, -0.002, 0.002, 0.001, 0.001, 0.003, 0.003, -0.001 are obtained. The difference values are converted according to the same multiple 1000 to obtain integer variable values, i.e. multiple difference values -6, 0, -1, -2, 0, 0, 1, -2, 2, 1, 1, 3, 3, -1.

[0101] S350, forming a third array from the multiple difference values; and splicing the number of field values contained in the first array, the variable values, and the third array according to a preset format to generate a corresponding compression result.

[0102] In this embodiment, the compression result is 18#3.887#-6, 0, -1, -2, 0, 0, 1, -2, 2, 1, 1, 3, 3, -1. It can be understood that the original value of the field value can be restored by the corresponding decompression UDF function.

[0103] In this embodiment, the compression result can be obtained as much as possible by a diversified processing method, and the effects of saving storage space and easy to restore and read are simultaneously achieved.

[0104] Corresponding to the foregoing application function implementation method embodiment, the application further provides a data compression processing device, an electronic device and corresponding embodiments.

[0105] Figure 5 FIG. 1 is a structural schematic diagram of a data compression processing device according to an embodiment of the application.

[0106] Referring to FIG. 1, Figure 5 the data compression processing device according to an embodiment of the application includes an acquisition module 410, a statistical module 420, a processing module 430 and an output module 440. Wherein:

[0107] The acquisition module 410 is configured to acquire the field values of the target field, and form a first array according to the preset rule.

[0108] The statistical module 420 is configured to count the field values in the first array, and determine the variable value of the preset statistical quantity.

[0109] The processing module 430 is configured to respectively acquire the multiple difference values of the field values and the variable values in the first array.

[0110] The output module 440 is configured to compress according to the number of the field values, the variable value and the multiple difference values contained in the first array, and obtain the compression result of the field values of the target field.

[0111] In a specific implementation, the statistics module 420 is configured to convert the valid field values in the first array into corresponding integer field values respectively, form a second array according to the integer field values, perform statistics according to the integer field values in the second array, determine the integer variable value of the preset statistical quantity, or determine the variable value of the preset statistical quantity according to the valid field values in the first array, and convert the variable value into the integer variable value. The processing module 430 is configured to subtract the integer field values in the second array from the integer variable value respectively to obtain corresponding difference values. The output module is configured to form a third array according to the difference values, and splice the number of field values, the variable value and the third array in the first array according to the preset format to generate a corresponding compression result. Alternatively, the processing module 430 is configured to subtract the valid field values in the first array from the variable value respectively to obtain corresponding difference values, and convert the difference values into the difference values.

[0112] Referring to Figure 6 In an embodiment of the present application, the data compression processing apparatus further includes a deletion module 450 configured to delete the field values of the preset type located at the preset position in the first array. The deletion module 450 can delete all or part of the field values with the reserved value in the first array.

[0113] As can be seen from the example, the apparatus of the present application can compress the long string in the target field into a concise string, thereby saving storage space.

[0114] As to the apparatus in the above embodiments, the specific manner in which each module performs the operation has been described in detail in the embodiments of the method, and will not be described in detail here.

[0115] Figure 7 FIG. 1 is a structural schematic diagram of an electronic device according to an embodiment of the present application.

[0116] Referring to Figure 7 The electronic device 1000 includes a memory 1010 and a processor 1020.

[0117] The processor 1020 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0118] The memory 1010 can include various types of storage units such as a system memory, a read-only memory (ROM), and a permanent storage device. Among them, the ROM can store static data or instructions required by the processor 1020 or other modules of the computer. The permanent storage device can be a rewritable storage device. The permanent storage device can be a non-volatile storage device that does not lose stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device employs a mass storage device (e.g., a magnetic or optical disk, a flash memory) as a permanent storage device. In some other embodiments, the permanent storage device can be a removable storage device (e.g., a floppy disk, an optical drive). The system memory can be a readable and writable storage device or a volatile readable and writable storage device such as a dynamic random access memory. The system memory can store some or all of the instructions and data required by the processor at runtime. In addition, the memory 1010 can include a combination of any computer readable storage media, including various types of semiconductor storage chips (e.g., DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), magnetic disks and / or optical disks. In some embodiments, the memory 1010 can include a readable and / or writable removable storage device such as a compact disc (CD), a read-only digital versatile disc (e.g., DVD-ROM, dual-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (e.g., SD card, min SD card, Micro-SD card, etc.), a magnetic floppy disk, etc. The computer readable storage medium does not include a carrier wave and an instantaneous electronic signal transmitted by wireless or wired transmission.

[0119] The memory 1010 stores executable code, which, when processed by the processor 1020, can cause the processor 1020 to perform part or all of the above-mentioned methods.

[0120] In addition, the method according to the present application can also be implemented as a computer program or computer program product, which includes computer program code instructions for executing part or all of the steps of the above-mentioned methods of the present application.

[0121] Alternatively, the present application can also be implemented as a computer readable storage medium (or non-transitory machine readable storage medium or machine readable storage medium) having executable code (or computer program or computer instruction code) stored thereon, which, when executed by a processor of an electronic device (or server, etc.), causes the processor to perform part or all of the steps of the above-mentioned methods according to the present application.

[0122] Having described various embodiments of the application, it is to be understood that the above description is meant not to limit and not to encompass all of the possible embodiments. Many modifications and variations of this application can be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. It is intended that the scope of the application be defined by the scope of the patent and equivalents thereof.

Claims

1. A data compression processing method, characterized in that, include: Obtain the field values ​​of target fields corresponding to multiple battery cells, and form a first array of the field values ​​according to a preset rule; wherein, the number of field values ​​in the first array is the number of multiple battery cells, at least some field values ​​are valid values ​​of real values, and the remaining field values ​​are invalid values ​​of a preset type; Based on the field values ​​in the first array, statistical analysis is performed to determine the variable value of a preset statistic; the preset statistic is the median or mean of the field values ​​using valid values. Obtain the multiple difference between the field value and the variable value in the first array respectively; The number of field values, variable values, and multiplier values ​​contained in the first array are compressed according to a preset format to obtain the compressed field value of the target field.

2. The method according to claim 1, characterized in that, Before performing statistical analysis based on the field values ​​in the first array to determine the variable value of the preset statistic, the method further includes: Delete the field value that matches the preset type and is located at a preset position in the first array.

3. The method according to claim 1, characterized in that, The step of performing statistics based on the field values ​​in the first array to determine the variable values ​​of the preset statistics includes: Convert the valid field values ​​in the first array to their corresponding integer field values, and form a second array based on these integer field values; perform statistics based on the integer field values ​​in the second array to determine the integer variable values ​​of a preset statistical quantity; or Based on the valid field values ​​in the first array, determine the variable values ​​of the preset statistics; convert the variable values ​​into integer variable values.

4. The method according to claim 3, characterized in that, The step of obtaining the multiple difference between the field value and the variable value in the first array includes: The integer field values ​​in the second array are subtracted from the integer variable values ​​to obtain the corresponding difference values.

5. The method according to claim 1, characterized in that, The step of obtaining the multiple difference between the field value and the variable value in the first array includes: The valid field values ​​in the first array are subtracted from the variable values ​​respectively to obtain the corresponding difference values; Convert the difference into a multiple of the difference.

6. The method according to claim 1, characterized in that, The method further includes: When a field value in the first array is invalid, the invalid value is processed according to a preset method.

7. The method according to claim 1, characterized in that, The step of compressing the target field value based on the number of field values, variable values, and multiplier values ​​contained in the first array to obtain the compressed field value includes: The aforementioned difference values ​​are grouped into a third array; The number of field values, variable values, and the third array contained in the first array are concatenated according to a preset format to generate the corresponding compressed result.

8. A data compression processing apparatus, characterized in that, include: The acquisition module is used to acquire the field values ​​of target fields corresponding to multiple battery cells, and form a first array of the field values ​​according to a preset rule; wherein, the number of field values ​​in the first array is the number of multiple battery cells, at least some field values ​​are valid values ​​of real values, and the remaining field values ​​are invalid values ​​of a preset type; The statistics module is used to perform statistics based on the field values ​​in the first array to determine the variable value of a preset statistic; the preset statistic is the median or mean of the field values ​​using valid values; The processing module is used to obtain the multiple difference between the field value and the variable value in the first array, respectively; The output module is used to compress the number of field values, variable values ​​and multiplier values ​​contained in the first array according to a preset format to obtain the compression result of the field value of the target field.

9. An electronic device, characterized in that, include: processor; as well as A memory having executable code stored thereon, which, when executed by the processor, causes the processor to perform the method as described in any one of claims 1-7.

10. A computer-readable storage medium having executable code stored thereon, which, when executed by a processor of an electronic device, causes the processor to perform the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Method and device for compressing data and decompressing data

    CN112054804A