Data processing method and device
By splitting and encoding the stored data, a storage identification code is generated to replace the original data, the problem of waste of storage resources is solved, and the effect of reducing data volume and saving storage space is achieved.
Patent Information
- Application Number
- CN202210197600.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-01
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2042-03-01
AI Technical Summary
When storing large amounts of digital data, the prior art requires storing separators, resulting in wasted storage resources and lack of efficient solutions.
By obtaining the data to be stored, splitting it into data to be processed, and segmenting rules are determined based on the number of data to be processed, target data is determined based on the segmenting rules and preset encoding table, identification code is generated, and storage identification code is stored to replace the original data.
It reduces the amount of data to be stored, saves a lot of storage space, avoids waste of resources, and improves the accuracy of data reading.
Smart Images

Figure CN114579570B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method. The present application also relates to a data processing device, a computing device, and a computer-readable storage medium. Background Art
[0002] With the development of Internet technology and the advent of the big data era, the amount of data generated is increasing. When storing massive data, the storage space required is also increasing. For data containing a large number of numbers, which are generally small, in the prior art, data with multiple meanings are usually separated and stored in the form of separators. However, since the separators need to be stored while storing the numbers, a large amount of storage resources will be consumed. Therefore, an effective solution is urgently needed to solve the above problem. Summary of the invention
[0003] In view of this, the embodiment of the present application provides a data processing method to solve the technical defects existing in the prior art. The embodiment of the present application also provides a data processing device, a computing device, and a computer-readable storage medium.
[0004] According to a first aspect of an embodiment of the present application, a data processing method is provided, including:
[0005] Acquire data to be stored, and split the data to be stored into at least one data to be processed;
[0006] Determine segmentation rules based on the amount of data to be processed;
[0007] Determine the target data corresponding to each to-be-processed data based on the segmentation rule and the preset coding table;
[0008] An identification code corresponding to each target data is generated, and a storage identification code corresponding to the data to be stored is generated and stored according to the identification code corresponding to each target data.
[0009] Optionally, obtaining the data to be stored includes:
[0010] Get the original data string;
[0011] The original data character string is converted into data to be stored based on a preset conversion algorithm.
[0012] Optionally, determining the target data corresponding to each to-be-processed data based on the segmentation rule and a preset coding table includes:
[0013] Determine the data interval corresponding to each to-be-processed data based on the segmentation rule and the preset coding table;
[0014] Calculate the target data corresponding to each data to be processed according to the data interval corresponding to each data to be processed.
[0015] Optionally, determining the data interval corresponding to each to-be-processed data based on the segmentation rule and the preset coding table includes:
[0016] Obtaining the global data interval of the preset coding table;
[0017] The global data interval is divided into a plurality of data intervals based on the segmentation rule, wherein each data to be processed corresponds to a data interval.
[0018] Optionally, the calculating the target data corresponding to each to-be-processed data according to the data interval corresponding to each to-be-processed data includes:
[0019] Determine the starting data of the data interval corresponding to each data to be processed;
[0020] According to the starting data corresponding to each piece of data to be processed, the target data corresponding to each piece of data to be processed is determined.
[0021] Optionally, after the step of splitting the data to be stored into at least one data to be processed is performed, the following steps are included:
[0022] Based on the data to be stored, location information corresponding to each piece of data to be processed is determined.
[0023] Optionally, the generating of the identification code corresponding to each target data, and generating and storing the storage identification code corresponding to the data to be stored according to the identification code corresponding to each target data, comprises:
[0024] Determine the location information corresponding to each target data according to the location information corresponding to each data to be processed;
[0025] According to the location information corresponding to each target data and the identification code corresponding to each target data, the storage identification code corresponding to the data to be stored is determined.
[0026] Optionally, the method further comprises:
[0027] receiving a data read instruction, wherein the data read instruction carries a storage identification code;
[0028] Determine multiple identification codes based on the stored identification code, and determine the target data corresponding to each identification code; determine the data to be processed corresponding to each target data according to the segmentation rule and the preset coding table;
[0029] The data to be stored corresponding to the storage identification code is determined based on each data to be processed.
[0030] Optionally, determining the data to be processed corresponding to each target data according to the segmentation rule and the preset coding table includes:
[0031] Determine the data interval corresponding to each target data according to the segmentation rule and the preset coding table;
[0032] The data to be processed corresponding to each target data is calculated according to the data interval corresponding to each target data.
[0033] According to a second aspect of an embodiment of the present application, there is provided a data processing device, including:
[0034] An acquisition module is configured to acquire data to be stored and split the data to be stored into at least one data to be processed;
[0035] A determination module, configured to determine a segmentation rule according to the amount of data to be processed;
[0036] A processing module, configured to determine target data corresponding to each to-be-processed data based on the segmentation rule and a preset coding table;
[0037] The generating module is configured to generate an identification code corresponding to each target data, and to generate and store a storage identification code corresponding to the data to be stored according to the identification code corresponding to each target data.
[0038] According to a third aspect of an embodiment of the present application, another data processing method is provided, including:
[0039] receiving a data read instruction, wherein the data read instruction carries a storage identification code;
[0040] Determine a plurality of identification codes based on the stored identification code, and determine target data corresponding to each identification code;
[0041] Determine the data to be processed corresponding to each target data according to the segmentation rules and the preset coding table;
[0042] The data to be stored corresponding to the storage identification code is determined based on each data to be processed.
[0043] Optionally, determining the data to be processed corresponding to each target data according to the segmentation rule and the preset coding table includes:
[0044] Determine the data interval corresponding to each target data according to the segmentation rule and the preset coding table;
[0045] The data to be processed corresponding to each target data is calculated according to the data interval corresponding to each target data.
[0046] According to a fourth aspect of an embodiment of the present application, another data processing device is provided, including:
[0047] A receiving module, configured to receive a data reading instruction, wherein the data reading instruction carries a storage identification code;
[0048] A first determination module is configured to determine a plurality of identification codes based on the stored identification code, and determine target data corresponding to each identification code;
[0049] A second determination module is configured to determine the to-be-processed data corresponding to each target data according to the segmentation rule and the preset coding table;
[0050] The third determination module is configured to determine the to-be-stored data corresponding to the storage identification code based on each to-be-processed data.
[0051] According to a fifth aspect of an embodiment of the present application, there is provided a computing device, including:
[0052] Memory and processor;
[0053] The memory is used to store computer-executable instructions, and the processor implements the steps of the data processing method when executing the computer-executable instructions.
[0054] According to a sixth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the data processing method are implemented.
[0055] According to a seventh aspect of an embodiment of the present application, a chip is provided, which stores a computer program, and the computer program implements the steps of the data processing method when executed by the chip.
[0056] The data processing method provided by the present application obtains the data to be stored and splits the data to be stored into at least one data to be processed; determines the segmentation rule according to the number of data to be processed; determines the target data corresponding to each data to be processed based on the segmentation rule and the preset coding table; generates an identification code corresponding to each target data, and generates and stores the storage identification code corresponding to the data to be stored according to the identification code corresponding to each target data. By splitting the data to be stored, the identification codes corresponding to the split data to be processed are determined in sequence and stored, thereby avoiding the direct storage of the data to be stored, reducing the amount of data to be stored, and saving a lot of storage space. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 is a flow chart of a data processing method provided by an embodiment of the present application;
[0058] Figure 2is a processing flow chart of a data processing method applied to string data processing provided by an embodiment of the present application;
[0059] Figure 3 is a structural schematic diagram of a data processing device provided by an embodiment of the present application;
[0060] Figure 4 is a flow chart of another data processing method provided by an embodiment of the present application;
[0061] Figure 5 is a structural schematic diagram of another data processing device provided by an embodiment of the present application;
[0062] Figure 6 It is a structural block diagram of a computing device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0063] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.
[0064] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.
[0065] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, such 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, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.
[0066] First, the terms involved in one or more embodiments of the present invention are explained.
[0067] ASCII (American Standard Code for Information Interchange) is a computer coding system based on the Latin alphabet. ASCII code uses a specified 7-bit or 8-bit binary number combination to represent 128 or 256 possible characters.
[0068] BCD (Binary-Coded Decimal) uses 4 bits of binary to represent the 10 digits 0 to 9 in a decimal number. It is a binary digital encoding form, a decimal code encoded in binary. This encoding form of BCD uses four bits to store a decimal digit, making the conversion between binary and decimal quick.
[0069] Byte: A byte stores an 8-bit unsigned number and is used to store a binary digital sequence in the range of 0-255. The binary digital sequence is used as a digital unit in the computer, generally an 8-bit binary number.
[0070] In the present application, a data processing method is provided. The present application also relates to a data processing device, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
[0071] Figure 1 A flow chart of a data processing method provided according to an embodiment of the present application is shown, which specifically includes the following steps:
[0072] Step 102: Acquire data to be stored, and split the data to be stored into at least one piece of data to be processed.
[0073] Specifically, the data to be stored refers to computer data obtained after conversion by a hash algorithm or other data conversion algorithm, and is data composed of numbers and characters obtained after converting data composed of numbers, letters, symbols, etc. with certain meanings; the data to be processed corresponds to the data to be stored, and is obtained by splitting the data to be stored according to certain splitting rules, and each data to be processed obtained by the split is subsequently processed and stored.
[0074] Based on this, in the process of storing the data to be stored, the data to be stored is obtained, and the data to be stored is split according to the preset splitting rules to obtain multiple processed data corresponding to the data to be stored, wherein the processed data are all represented in the form of numbers or characters to facilitate the subsequent storage of the processed data.
[0075] In practical applications, when the data to be stored is split, the data to be stored can be split based on the separator as the split point, or it can be split based on the number of digits of the data, with every two digits or characters being split into a segment of data. This embodiment does not specifically limit the data splitting rules.
[0076] Furthermore, when obtaining the data to be stored, considering that the data to be stored needs to be converted from the original data string through a conversion algorithm, the original data string needs to be obtained and converted before determining the data to be stored. The specific implementation is as follows:
[0077] Acquire an original data string; and convert the original data string into data to be stored based on a preset conversion algorithm.
[0078] Specifically, the original data string refers to data composed of numbers, letters, symbols, etc. with certain meanings. The original data string can be user behavior data, such as data generated by users using applications, including the time corresponding to the user's behavior, the memory space occupied, the function called, etc., where the user's behavior includes operations such as login, logout, and browsing; the original data string can also be data in a log file, that is, the corresponding data in a log file or file collection used to record system operation events; the conversion algorithm refers to an algorithm that converts an original data string with a large number of bytes into a string in a more compact numerical representation form. In this embodiment, the conversion algorithm can be a hash algorithm, and the string can be composed of numbers and characters. For example, the original data string can be function, time, and other data. The original data is converted using a hash algorithm to obtain data "@12#23#1", and the data "@12#23#1" is the data to be stored.
[0079] Based on this, before determining the data to be stored, the original data string is obtained, and the original data string is converted using a conversion algorithm to convert the original data string of variable length into data to be stored with consistent expression form and string length, so as to facilitate subsequent processing and storage of the data to be stored.
[0080] In summary, the conversion algorithm is used to convert the original data string into data to be stored with a fixed length and consistent expression, thereby achieving standardization of the original data string and facilitating the processing and storage of the data to be stored.
[0081] Furthermore, after the data to be stored is split into at least one data to be processed, in order to store the processed data in sequence according to the split order of the data to be stored, the position information of the split data to be processed in the data to be stored can also be recorded when the data to be stored is split. The specific implementation is as follows:
[0082] Based on the data to be stored, location information corresponding to each piece of data to be processed is determined.
[0083] Specifically, the position information refers to the position of each data to be processed in the data to be stored when the data to be stored is split. For example, the data to be stored is split into three data to be processed, and each data to be processed is assigned a number or label to indicate the position of the data to be processed in the data to be stored.
[0084] Based on this, in the process of splitting the data to be stored, while splitting each data to be processed, the position information of each data to be processed in the data to be stored is recorded as the position attribute label of each data to be processed, which is used to indicate the position of the data to be processed in the data to be stored. When the data to be processed is subsequently processed, the position attribute label is also recorded.
[0085] For example, when storing the original data "f(x)+2000.10.02.16:40+2kb", the original data "f(x)+2000.10.02.16:40+2kb" is converted by using a hash algorithm or other data conversion algorithm to obtain the data to be stored "@12#23#1". In the data to be stored "@12#23#1", "12" corresponds to "f(x)", "23" corresponds to "2000.10.02.16:40", and "1" corresponds to "2kb". The data to be stored "@12#23#1" is split into three groups of data to be processed, "12", "23", and "1", using the delimiters @ and # as splitting points. Since the data to be processed "12" corresponds to the first group of data "f(x)" in the original data, the label value "1 group" is assigned to the data to be processed "12". Similarly, the data to be processed "23" corresponds to "2000.10.02.16:40" and the label value "2 groups". The data to be processed "1" corresponds to "2kb" and the label value "3 groups".
[0086] In summary, by recording the position information of the data to be processed in the data to be stored, the data to be stored can be orderly split and recorded, thereby ensuring the storage order of the data to be processed.
[0087] Step 104: determine segmentation rules according to the amount of data to be processed.
[0088] Specifically, after the data to be stored is split into multiple data to be processed, since the data to be processed cannot be directly stored, it is also necessary to determine the segmentation rules according to the number of data to be processed obtained by the splitting, wherein the segmentation rules refer to the division criteria determined according to the number of data to be processed, and each data to be processed has a corresponding data segment.
[0089] Based on this, after the data to be stored is split to obtain multiple data to be processed, the segmentation rule is determined according to the number of data to be processed, that is, each data to be processed corresponds to a data segment, and the proportion of each data segment is determined at the same time.
[0090] In this embodiment, after the amount of data to be processed is determined, the segmentation rules are determined according to the amount of data to be processed and the numerical value of the data to be processed, the proportion of segmented data is determined for each data to be processed, and the number of data included in the data range of the segmented data is greater than the data value of the data to be processed.
[0091] Continuing with the above example, when determining the segmentation rules for the data to be processed "12", "23", and "1", since there are three data to be processed, the segmentation rule is to divide it into three data segments, and each data to be processed corresponds to one data segment. Since the values in the data to be processed are "12", "23", and "1", respectively, when determining the segmentation rule, the number of data contained in the first data segment must be greater than 12, the number of data contained in the second data segment must be greater than 23, and the number of data contained in the third data segment must be greater than 1. The number of data contained in each data segment can also be determined according to a ratio of 2:1:1, and this embodiment does not impose any limitation on this. In this embodiment, the segmentation rule is to divide it into three data segments according to a ratio of 2:1:1.
[0092] Step 106: determine the target data corresponding to each to-be-processed data based on the segmentation rule and the preset coding table.
[0093] Specifically, after the data to be processed and the segmentation rules are determined as above, considering that the data to be processed cannot be stored directly, it is also necessary to determine the target data corresponding to the data to be processed based on the preset coding table and the segmentation rules. Therefore, the data to be processed can be processed according to the preset coding table and the segmentation rules to determine the target data corresponding to each data to be processed, wherein the preset coding table refers to a code description table for explaining the meaning of letters, numbers and character codes, and the preset coding table includes but is not limited to the ASCII coding table, BCD code, etc. The preset coding table can also be a custom comparison table; the target data refers to the data corresponding to the data to be processed determined with reference to the preset coding table.
[0094] Based on this, the preset coding table is segmented according to the segmentation rules corresponding to the data to be processed, and the coding segment of the preset coding table corresponding to each data to be processed is determined, that is, the starting value and ending value of each data to be processed in the preset coding table are calculated according to the coding segment of each data to be processed to obtain the target data corresponding to each data to be processed.
[0095] Furthermore, when determining the target data corresponding to the data to be processed, considering that the data value of each data to be processed may be different, when determining the target data corresponding to each data to be processed, it is necessary to calculate each data to be processed separately based on the data interval corresponding to each data to be processed, and the specific implementation is as follows:
[0096] The data interval corresponding to each to-be-processed data is determined based on the segmentation rule and the preset coding table; and the target data corresponding to each to-be-processed data is calculated according to the data interval corresponding to each to-be-processed data.
[0097] Specifically, the data interval refers to the data value range contained in each data segment obtained by dividing the preset coding table according to the segmentation rule. Each data to be processed corresponds to a data interval, and the number of values contained in the value range of each data interval is greater than the number of values corresponding to the data to be processed. If the data to be processed is 23, the data interval can be 0-24, that is, the end value minus the start value of the data interval is greater than or equal to the value of the data to be processed.
[0098] Based on this, the preset coding table is segmented according to the segmentation rule, and the preset coding table is divided into multiple data intervals, each data interval corresponds to a data to be processed. The data to be processed is calculated in the data interval corresponding to each data to be processed to obtain the target data corresponding to each data to be processed.
[0099] To sum up, each data to be processed is calculated separately according to the data interval corresponding to each data to be processed, so that the data with lower space occupancy in the preset coding table can be used to represent the data with higher space occupancy, thereby saving storage space and avoiding waste of resources.
[0100] Furthermore, when determining the data space based on the preset coding table, considering that the data interval ranges of different preset coding tables are also different, it is necessary to determine the global data interval of the preset coding table, and then divide the global data interval into multiple data intervals based on the segmentation rule, which is specifically implemented as follows:
[0101] Acquire a global data interval of the preset coding table; divide the global data interval into a plurality of data intervals based on the segmentation rule, wherein each data to be processed corresponds to a data interval.
[0102] Specifically, the global data interval refers to the data range represented by the preset code table. The data range is different for different types of preset code tables. For example, the data range of the ASCII code table is 0-255, or the data range of the custom preset code table is 0-100, 0-300, etc.
[0103] The data interval refers to the data value range contained in each data segment obtained by dividing the preset coding table according to the segmentation rules. Each data to be processed corresponds to a data interval, and the number of values contained in the value range of each data interval is greater than the number of values corresponding to the data to be processed. If the data to be processed is 23, the data interval can be 0-24, that is, the end value minus the start value of the data interval is greater than or equal to the value of the data to be processed.
[0104] Based on this, a preset coding table is determined, and the global data range of the preset coding table is determined. The preset coding table is divided according to the segmentation rule, and the preset coding table is divided into multiple data ranges, and each data range corresponds to a data to be processed. When determining the data range corresponding to each data to be processed, the data range corresponding to each data to be processed can be determined according to the position information of the data to be processed, where the position information of the data to be processed matches the position information of the data range in the global data range.
[0105] In practical applications, for three data to be processed, the global data range of the preset coding table needs to be divided into three data ranges. The corresponding relationship between the data to be processed and the data range can be determined by the position information of the data to be processed in the data to be stored and the position information of the data range in the global data range. That is, the first data to be processed corresponds to the first data range (min, x), the second data to be processed corresponds to the second data range (y, z), and the third data to be processed corresponds to the third data range (h, max), where min and x are the start value and end value of the first data range respectively, and min < x; y and z are the start value and end value of the second data range respectively, and y < z; h and max are the start value and end value of the third data range respectively, and h < max.
[0106] In summary, by dividing the global data range of the preset coding table into multiple data ranges, one data to be processed corresponds to one data range, so as to facilitate subsequent calculation of the data to be processed according to the data range.
[0107] Furthermore, after determining the data range corresponding to each data to be processed, it is also necessary to calculate the data to be processed based on the start data in the data range to obtain the target data corresponding to the data to be processed. The specific implementation is as follows:
[0108] Determine the start data of the data range corresponding to each data to be processed; according to the start data corresponding to each data to be processed, determine the target data corresponding to each data to be processed.
[0109] Specifically, the start data refers to the start value of the interval corresponding to each data range in the preset coding table. When calculating the data to be processed, the value of the data to be processed is added to the data value corresponding to the start data of the data range it corresponds to, to obtain the target data corresponding to the data to be processed.
[0110] Based on this, when calculating the target data corresponding to each data to be processed, determine the data range in the preset coding table corresponding to the data to be processed. Select the start data of the data range, and the value corresponding to the data to be processed, and add the value corresponding to the start data to the value corresponding to the data to be processed, and the sum of the obtained values is the target data corresponding to the data to be processed.
[0111] Using the above example, the data range of the ASCII code table is divided into 0-255 according to the segmentation rule, and the data interval 0-255 is divided into three sub-data intervals at a ratio of 2:1:1. The data range of the first sub-data interval is 0-127, corresponding to the data to be processed "12"; the data range of the second sub-data interval is 128-196, corresponding to the data to be processed "23"; the data range of the third sub-data interval is 197-255, corresponding to the data to be processed "1". For the data to be processed "12", the starting value 0 of the first sub-data interval 0-127 is added to the data to be processed "12" to obtain the target data 12 corresponding to the data to be processed "12", and so on, the target data 151 corresponding to the data to be processed "23" and the target data 198 corresponding to the data to be processed "1" are obtained.
[0112] To sum up, by calculating the target data of the data to be processed based on the preset coding table, the storage of the data to be processed is realized based on the target data, and the data with lower space occupancy in the preset coding table is used to represent the data to be processed with higher space occupancy, thereby saving storage space and avoiding waste of resources.
[0113] Step 108: Generate an identification code corresponding to each target data, and generate and store a storage identification code corresponding to the data to be stored according to the identification code corresponding to each target data.
[0114] Specifically, after the target data corresponding to each data to be processed is determined as mentioned above, since the target data cannot be directly stored, it is also necessary to determine the identification code corresponding to the target data, wherein the identification code refers to the identification code corresponding to the target data stored in the preset coding table, expressed in eight-bit binary form; the storage identification code refers to the identification code corresponding to the data to be stored, and is composed of eight-bit binary data corresponding to each data to be processed.
[0115] Based on this, the target data is converted to generate an identification code corresponding to each target data. Since the target data is determined based on the data to be processed, the identification code corresponding to the target data is the identification code corresponding to the data to be processed. An identification code corresponding to each data to be processed is generated based on the identification code corresponding to the target data. An identification code corresponding to the data to be stored is generated based on the identification code corresponding to each data to be stored, and the identification code is stored.
[0116] Further, after determining the location information corresponding to each data to be processed, in order to store the identification code corresponding to the target data according to the location information of the data to be processed in the data to be stored, when determining the target data, it is also necessary to record the location information corresponding to the target data, which is specifically implemented as follows:
[0117] The location information corresponding to each target data is determined according to the location information corresponding to each data to be processed; and the storage identification code corresponding to the data to be stored is determined according to the location information corresponding to each target data and the identification code corresponding to each target data.
[0118] Specifically, the position information corresponding to the target data is the position information corresponding to the data to be processed, which is used to indicate the position of the target data determined according to the data to be processed in the data to be stored. Since the target data is calculated based on the data to be processed and the storage interval corresponding to the data to be processed, the position information of the data to be processed is the position information of the target data corresponding to the data to be processed.
[0119] Based on this, the position information of each data to be processed in the data to be stored is determined, and the target data corresponding to each data to be processed is obtained after calculation for each data to be processed, and the position information corresponding to the data to be processed is the position information corresponding to the target data. The identification code corresponding to each target data is arranged according to the position information of the target data to obtain the storage identification code corresponding to the data to be stored.
[0120] Using the above example, the positional relationship of the target data corresponding to the data to be processed can be determined based on the positional correspondence between the data to be processed "12", "23", "1" and the data to be stored "@12#23#1", that is, the first target data is "12", the second target data is "151", and the third target data is "198". The identification codes corresponding to the target data "12", "151", and "198" are generated according to the base conversion rule. The eight-bit binary form corresponding to the number 12 is 00001100, and the corresponding identification code is "00001100"; the eight-bit binary form corresponding to the number 151 is 10010111, and the corresponding identification code is "10010111"; the eight-bit binary form corresponding to the number 198 is 11000110, and the corresponding identification code is "11000110". According to the location information of the target data "12", "151", and "198", it can be determined that the storage identification code corresponding to the data to be stored "@12#23#1" is "000011001001011111000110". If the data to be stored "@12#23#1" is directly stored, since each character takes up one byte, it takes 8 bytes to store the data to be stored "@12#23#1". If the storage identification code is stored, each eight-bit binary number takes up one byte, so the storage identification code corresponding to the data to be stored "@12#23#1" takes up three bytes.
[0121] In addition, the data to be stored can also be composed of characters and letters. For example, for the data to be stored "@C#AB#D", the data to be stored "@C#AB#D" is split with the separator as the splitting point, and is split into three groups of data to be processed, namely "C", "AB", and "D". Taking the ASCII code table as the preset encoding table as an example, the binary expression data corresponding to the three groups of data to be processed "C", "AB", and "D" are searched in the ASCII code table. After searching the ASCII code table, it can be known that the binary form corresponding to the data to be processed "C" is expressed as 01000011, and the corresponding identification code is "010 00011", which occupies 1 byte; the binary form corresponding to the letter "A" is 01000001, and the binary form corresponding to the letter "B" is 01000010, so the binary form corresponding to the data "AB" to be processed is 0100000101000010, and the corresponding identification code is "0100000101000010", which occupies 2 bytes; the binary form corresponding to the data "D" to be processed is 01000100, and the corresponding identification code is "01000100", which occupies 1 byte. Therefore, after calculation, the storage identification code corresponding to the data to be stored "@C#AB#D" is "01000011010000010100001001000100", which occupies 4 bytes, and the data to be stored "@C#AB#D" occupies 7 bytes.
[0122] To sum up, by determining the location information of the target data, after generating an identification code corresponding to each target data, the storage identification code corresponding to the data to be stored can be generated according to the location information, and then the storage identification code is stored, which saves storage space, improves the utilization rate of storage space, and avoids problems such as excessive consumption of storage space and insufficient storage space caused by directly storing the data to be stored.
[0123] Furthermore, after the compressed storage of the data to be stored is completed, when the storage needs to read the data to be stored, the data to be stored corresponding to the storage identification code can be obtained by obtaining the storage identification code and processing the storage identification code. The specific implementation is as follows:
[0124] Receive a data read instruction, wherein the data read instruction carries a storage identification code; determine multiple identification codes based on the storage identification code, and determine the target data corresponding to each identification code; determine the data to be processed corresponding to each target data according to the segmentation rule and the preset coding table; determine the data to be stored corresponding to the storage identification code based on each data to be processed.
[0125] Specifically, the data read instruction refers to a computer command used to implement a data read operation. In this embodiment, the data read instruction refers to an instruction to read the data to be stored. When the data read instruction is initiated, the server determines the storage identification code in response to the data read instruction, and determines the data to be stored according to the storage identification code to complete the data reading.
[0126] Based on this, a data reading instruction carrying a storage identification code is received, multiple identification codes constituting the storage identification code are determined according to the storage identification code, each identification code is converted respectively, and the target data corresponding to each identification code is obtained. The data to be processed corresponding to each target data is calculated according to the segmentation rule and the preset coding table, and the data to be stored is composed of each data to be processed.
[0127] In summary, when data is read, the data to be stored corresponding to the storage identification code can be determined according to the storage identification code, the segmentation rule and the preset coding table, thereby improving the accuracy of data reading.
[0128] Furthermore, when determining the data to be processed corresponding to each target data, considering that the target data is calculated according to the segmentation rule and the preset coding table, the data interval corresponding to the target data can be determined based on the segmentation rule and the preset coding table, and then the data to be processed corresponding to the target data can be determined according to the data interval, which is specifically implemented as follows:
[0129] The data interval corresponding to each target data is determined according to the segmentation rule and the preset coding table; and the to-be-processed data corresponding to each target data is calculated according to the data interval corresponding to each target data.
[0130] Based on this, in the process of determining the data to be processed corresponding to each target data according to the segmentation rules and the preset coding table, first determine the data interval corresponding to each target data according to the segmentation rules and the preset coding table, and when calculating the target data, determine the starting value of the data interval corresponding to the target data, and determine the data to be processed according to the difference between the target data and the starting value of the data interval, that is, the target data is used as the minuend, and the starting value of the data interval is used as the subtrahend, and the data to be processed corresponding to the target data is obtained after subtraction operation, and the above calculation method is used to calculate the data to be processed corresponding to each target data.
[0131] Continuing with the above example, a data read instruction carrying the storage identification code "000011001001011111000110" is received to read the data corresponding to the storage identification code. The storage identification code consists of three eight-bit binary numbers, so the storage identification code can be divided into three identification codes, namely, "00001100", "10010111", and "11000110". Convert each identification code into a decimal number to obtain the target data "12" corresponding to the identification code "00001100", the target data "151" corresponding to the identification code "10010111", and the target data "198" corresponding to the identification code "11000110". Calculate the data to be processed corresponding to each target data according to the data intervals 0-127, 128-196, and 197-255 corresponding to the target data respectively. The target data "12" corresponds to the data interval 0-127, "12" is used as the minuend, and the starting value 0 of the data interval 0-127 is used as the subtrahend. The data to be processed 12 is obtained by subtraction. The above method is used to calculate the target data "151" and "198" to obtain the data to be processed "23" and "1". The data to be processed "12", "23", and "1" constitute the data to be stored. The data to be processed "12", "23", and "1" are separated by the separator to obtain the data to be stored "@12#23#1". Then, the data to be stored "@12#23#1" is calculated according to the hash algorithm to obtain the original data "f(x)+2000.10.02.16:40+2kb" corresponding to the data to be stored "@12#23#1".
[0132] In summary, by splitting the data to be stored, determining the identification codes corresponding to the split data to be processed in turn and storing them, direct storage of the data to be stored is avoided, the amount of data to be stored is reduced, and a large amount of storage space is saved. When reading data, the data to be stored before storage can be read according to the storage identification code, segmentation rules and preset coding table, thereby improving the accuracy of data reading.
[0133] The following combination Figure 2 Taking the application of the data processing method provided in this application to string data as an example, the data processing method is further described. Figure 2 A processing flow chart of a data processing method for string data processing provided by an embodiment of the present application is shown, which specifically includes the following steps:
[0134] Step 202: Acquire data to be stored.
[0135] The data to be stored "@12#1#2" is obtained, where the data to be stored is obtained by performing a hash calculation on the original data "f(x)+2001.03.12.16:25+1kb".
[0136] Step 204: split the data to be stored to obtain at least one piece of data to be processed.
[0137] Since the data to be stored is composed of symbols and numbers, the delimiters "@" and "#" are used to separate the three types of data. The data to be stored "@12#1#2" is split using the delimiters as splitting points, and the data to be processed in the digital form contained in the data to be stored "@12#1#2" is obtained, that is, the data to be processed "12", "1", "2".
[0138] Step 206: Determine the location information of each data to be processed according to the data to be stored.
[0139] According to the positional relationship of the data to be processed "12", "1", and "2" in the data to be stored "@12#1#2", the positional information of the data to be processed "12", "1", and "2" are determined respectively, that is, the data to be processed "12" corresponds to the first position of the data to be stored "@12#1#2", the data to be processed "1" corresponds to the second position of the data to be stored "@12#1#2", and the data to be processed "2" corresponds to the last position of the data to be stored "@12#1#2".
[0140] Step 208: Determine segmentation rules according to the amount of data to be processed.
[0141] The data to be stored "@12#1#2" is divided into three data to be processed: "12", "1", and "2". Therefore, the segmentation rule is determined to be divided into three segments, and then the data range ratio of each segment is set. The ratio of 2:1:1 can be selected for segmentation.
[0142] Step 210: determine the data interval of each data to be processed based on the segmentation rule and the coding table.
[0143] Determine that the data range of the coding table is 0-255, and divide the data range of the coding table according to the segmentation rule. The data range corresponding to the data to be processed "12" is 0-127, the data range corresponding to the data to be processed "1" is 128-196, and the data range corresponding to the data to be processed "2" is 197-255.
[0144] Step 212, calculating the target data corresponding to each data to be processed according to the starting value of the data interval corresponding to each data to be processed.
[0145] The data interval corresponding to the data to be processed "12" is 0-127. When calculating the data to be processed "12", the starting value 0 of the data interval and the value 12 of the data to be processed are added to obtain the target data 12 corresponding to the data to be processed "12"; the above calculation method is used to calculate the data to be processed "1" and the data to be processed "2" respectively, to obtain the target data 129 corresponding to the data to be processed "1" and the target data 199 corresponding to the data to be processed "2".
[0146] Step 214: Generate an identification code corresponding to each target data.
[0147] Generate identification codes for the calculated target data 12, 129, and 199 respectively, convert the target data 12 into binary expression, and the generated identification code corresponding to the target data 12 is 00001100, the identification code corresponding to the target data 1 is 10000001, and the identification code corresponding to the target data 2 is 11000111.
[0148] Step 216, sorting the identification code corresponding to each target data according to the location information of each corresponding data to be processed to obtain a sorting result.
[0149] According to the location information of the data to be processed, the identification codes 00001100, 10000001, and 11000111 corresponding to the data to be processed are sorted. Since the arrangement order corresponding to the location information of the data to be processed is "12", "1", and "2", the sorting results of the identification codes are 00001100, 10000001, and 11000111.
[0150] Step 218: Determine the storage identification code corresponding to the data to be stored according to the sorting result.
[0151] According to the sorting results of the identification codes 00001100, 10000001, 11000111, it is determined that the storage identification code 000011001000000111000111.
[0152] Step 220, obtaining a data read instruction carrying a storage identification code.
[0153] Get the storage identification code 000011001000000111000111.
[0154] Step 222: Determine at least one identification code according to the stored identification codes.
[0155] According to the stored identification code 000011001000000111000111, the corresponding three identification codes 00001100, 10000001, and 11000111 are determined.
[0156] Step 224, determining target data corresponding to the identification code according to the identification code.
[0157] Convert each identification code into a decimal expression to obtain the target data 12 corresponding to the identification code 00001100, the target data 129 corresponding to the identification code 10000001, and the target data 199 corresponding to the identification code 11000111.
[0158] Step 226, determining the data interval corresponding to the target data based on the segmentation rule and the coding table.
[0159] Determine the data interval 0-127 in the coding table corresponding to target data 12, the data interval 128-196 in the coding table corresponding to target data 129, and the data interval 197-255 in the coding table corresponding to target data 199.
[0160] Step 228, calculating the data to be processed corresponding to the target data according to the data interval.
[0161] Combined with the data interval 0-127 corresponding to the target data 12, the target data 12 is calculated, the target data 12 is used as the minuend, and the starting value 0 of the data interval 0-127 is used as the subtrahend, and the data "12" to be stored corresponding to the target data 12 is obtained by subtraction. The above calculation method is used to obtain the data "1" to be processed corresponding to the target data 129 and the data "2" to be processed corresponding to the target data 199.
[0162] Step 230: Determine the data to be stored corresponding to the identification code based on the data to be processed.
[0163] The data to be stored "@12#1#2" is composed of the data to be processed "12", "1", "2" and the separator. The data to be stored "@12#1#2" is then calculated using the hash algorithm to obtain the original data "f(x)+2001.03.12.16:25+1kb" corresponding to the data to be stored "@12#1#2".
[0164] In summary, by splitting the data to be stored, determining the identification codes corresponding to the split data to be processed in turn and storing them, direct storage of the data to be stored is avoided, the amount of data to be stored is reduced, and a large amount of storage space is saved. When reading data, the data to be stored before storage can be read according to the storage identification code, segmentation rules and preset coding table, thereby improving the accuracy of data reading.
[0165] Corresponding to the above method embodiment, the present application also provides a data processing device embodiment, Figure 3 FIG. 1 is a schematic diagram showing the structure of a data processing device provided by an embodiment of the present application. Figure 3 As shown, the device comprises:
[0166] The acquisition module 302 is configured to acquire data to be stored and split the data to be stored into at least one data to be processed;
[0167] A determination module 304 is configured to determine a segmentation rule according to the amount of data to be processed;
[0168] The processing module 306 is configured to determine the target data corresponding to each to-be-processed data based on the segmentation rule and the preset coding table;
[0169] The generating module 308 is configured to generate an identification code corresponding to each target data, and generate and store a storage identification code corresponding to the data to be stored according to the identification code corresponding to each target data.
[0170] Optionally, the acquisition module 302 is further configured to:
[0171] Acquire an original data string; and convert the original data string into data to be stored based on a preset conversion algorithm.
[0172] Optionally, the processing module 306 is further configured to:
[0173] Determine the data interval corresponding to each to-be-processed data based on the segmentation rule and the preset coding table;
[0174] Calculate the target data corresponding to each data to be processed according to the data interval corresponding to each data to be processed.
[0175] Optionally, the processing module 306 is further configured to:
[0176] Acquire a global data interval of the preset coding table; divide the global data interval into a plurality of data intervals based on the segmentation rule, wherein each data to be processed corresponds to a data interval.
[0177] Optionally, the processing module 306 is further configured to:
[0178] Determine the starting data of the data interval corresponding to each data to be processed; and determine the target data corresponding to each data to be processed according to the starting data corresponding to each data to be processed.
[0179] Optionally, the acquisition module 302 is further configured to:
[0180] Based on the data to be stored, location information corresponding to each piece of data to be processed is determined.
[0181] Optionally, the acquisition module 302 is further configured to:
[0182] The location information corresponding to each target data is determined according to the location information corresponding to each data to be processed; and the storage identification code corresponding to the data to be stored is determined according to the location information corresponding to each target data and the identification code corresponding to each target data.
[0183] Optionally, the generating module 308 is further configured to:
[0184] Receive a data read instruction, wherein the data read instruction carries a storage identification code; determine multiple identification codes based on the storage identification code, and determine the target data corresponding to each identification code; determine the data to be processed corresponding to each target data according to the segmentation rule and the preset coding table; determine the data to be stored corresponding to the storage identification code based on each data to be processed.
[0185] Optionally, the generating module 308 is further configured to:
[0186] The data interval corresponding to each target data is determined according to the segmentation rule and the preset coding table; and the to-be-processed data corresponding to each target data is calculated according to the data interval corresponding to each target data.
[0187] The above is a schematic scheme of a data processing device of the present embodiment. It should be noted that the technical scheme of the data processing device and the technical scheme of the above-mentioned data processing method belong to the same concept. For the details not described in detail in the technical scheme of the data processing device, please refer to the description of the technical scheme of the above-mentioned data processing method. In addition, each component in the device embodiment should be understood as a functional module that must be established to implement each step of the program flow or each step of the method, and each functional module is not an actual functional division or separation definition. The device claim defined by such a group of functional modules should be understood as a functional module architecture that mainly implements the solution through the computer program recorded in the specification, and should not be understood as a physical device that mainly implements the solution through hardware.
[0188] Figure 4 A flowchart of another data processing method provided according to an embodiment of the present application is shown, which specifically includes the following steps:
[0189] Step 402: Receive a data read instruction, wherein the data read instruction carries a storage identification code.
[0190] In this embodiment, after the data to be stored is stored, the stored data can be read at any time. A data read instruction carrying a storage identification code "000011001001011111000110" is received to read the data corresponding to the storage identification code. Each storage identification code corresponds to one data to be stored.
[0191] Step 404: determine multiple identification codes based on the stored identification code, and determine target data corresponding to each identification code.
[0192] In this embodiment, after determining the storage identification code "000011001001011111000110", since the storage identification code is composed of three corresponding identification codes and eight-bit binary numbers, the storage identification code can be divided into three identification codes, namely, "00001100", "10010111", and "11000110". Convert each identification code into a decimal number to obtain the target data "12" corresponding to the identification code "00001100", the target data "151" corresponding to the identification code "10010111", and the target data "198" corresponding to the identification code "11000110".
[0193] Step 406: determine the data to be processed corresponding to each target data according to the segmentation rule and the preset coding table.
[0194] Furthermore, the data interval corresponding to each target data is determined according to the segmentation rule and the preset coding table; and the data to be processed corresponding to each target data is calculated according to the data interval corresponding to each target data.
[0195] In this embodiment, after the target data "12", "151", and "198" corresponding to the storage identification code "000011001001011111000110" are determined, each target data can be calculated respectively. The data to be processed corresponding to each target data is calculated according to the data intervals 0-127, 128-196, and 197-255 corresponding to the target data respectively. The target data "12" corresponds to the data interval 0-127, the target data "12" is used as the minuend, and the starting value 0 of the data interval 0-127 is used as the subtrahend. The subtraction operation is performed to obtain the data to be processed 12. The above method is used to calculate the target data "151" and the target data "198" to obtain the data to be processed "23" and the data to be processed "1".
[0196] Step 408: Determine the data to be stored corresponding to the storage identification code based on each data to be processed.
[0197] In this embodiment, the data to be stored is composed of the data to be processed "12", "23", and "1". The data to be processed "12", "23", and "1" are separated by a separator to obtain the data to be stored "@12#23#1".
[0198] It should be noted that steps 402 to 408 are consistent with the method of step 108 above. For a specific explanation of steps 402 to 408, please refer to the detailed content of step 108 in the above embodiment, which will not be repeated here.
[0199] Corresponding to the above method embodiment, the present application also provides a data processing device embodiment, Figure 5 FIG. 2 shows a schematic diagram of the structure of another data processing device provided by an embodiment of the present application. Figure 5 As shown, the device comprises:
[0200] The receiving module 502 is configured to receive a data read instruction, wherein the data read instruction carries a storage identification code;
[0201] A first determination module 504 is configured to determine a plurality of identification codes based on the stored identification code, and determine target data corresponding to each identification code;
[0202] The second determination module 506 is configured to determine the to-be-processed data corresponding to each target data according to the segmentation rule and the preset coding table;
[0203] The third determination module 508 is configured to determine the to-be-stored data corresponding to the storage identification code based on each to-be-processed data.
[0204] Optionally, the second determining module 506 is further configured to:
[0205] The data interval corresponding to each target data is determined according to the segmentation rule and the preset coding table; and the to-be-processed data corresponding to each target data is calculated according to the data interval corresponding to each target data.
[0206] The above is a schematic scheme of another data processing device of this embodiment. It should be noted that the technical scheme of the data processing device and the technical scheme of the above-mentioned data processing method belong to the same concept. For the details not described in detail in the technical scheme of the data processing device, please refer to the description of the technical scheme of the above-mentioned data processing method. In addition, the various components in the device embodiment should be understood as functional modules that must be established to implement each step of the program flow or each step of the method, and each functional module is not an actual functional division or separation definition. The device claim defined by such a group of functional modules should be understood as a functional module architecture that mainly implements the solution through the computer program recorded in the specification, and should not be understood as a physical device that mainly implements the solution through hardware.
[0207] The data interval corresponding to each target data is determined according to the segmentation rule and the preset coding table; and the to-be-processed data corresponding to each target data is calculated according to the data interval corresponding to each target data.
[0208] Figure 6The block diagram of a computing device 600 according to an embodiment of the present application is shown. The components of the computing device 600 include but are not limited to a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and the database 650 is used to store data.
[0209] The computing device 600 also includes an access device 640 that enables the computing device 600 to communicate via one or more networks 660. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 640 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0210] In one embodiment of the present application, the above components of the computing device 600 and Figure 6 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 6 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.
[0211] The computing device 600 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 600 may also be a mobile or stationary server.
[0212] The processor 620 is used to execute computer executable instructions of the data processing method.
[0213] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above data processing method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above data processing method.
[0214] An embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which are used in a data processing method when executed by a processor.
[0215] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above data processing method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above data processing method.
[0216] An embodiment of the present application further provides a chip storing a computer program, which implements the steps of the data processing method when executed by the chip.
[0217] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0218] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0219] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0220] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0221] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.
Claims
1. A data processing method, characterized in that: include: Acquire data to be stored, and split the data to be stored into at least one data to be processed; Determine segmentation rules based on the amount of data to be processed; Determine target data corresponding to each to-be-processed data based on the segmentation rule and the preset coding table, wherein the target data is calculated based on the data interval corresponding to the to-be-processed data, and the data interval is obtained by dividing the preset coding table based on the segmentation rule; Generate an identification code corresponding to each target data, and generate and store a storage identification code corresponding to the data to be stored based on the identification code corresponding to each target data, wherein the identification code is the identification code corresponding to the target data stored in the preset coding table, and the storage identification code is composed of the identification code.
2. The method according to claim 1, characterized in that The obtaining of the data to be stored includes: Get the original data string; The original data character string is converted into data to be stored based on a preset conversion algorithm.
3. The method according to claim 1, characterized in that The determining the data interval corresponding to each to-be-processed data based on the segmentation rule and the preset coding table includes: Obtaining the global data interval of the preset coding table; The global data interval is divided into a plurality of data intervals based on the segmentation rule, wherein each data to be processed corresponds to a data interval.
4. The method according to claim 1, characterized in that The step of calculating the target data corresponding to each data to be processed according to the data interval corresponding to each data to be processed includes: Determine the starting data of the data interval corresponding to each data to be processed; According to the starting data corresponding to each piece of data to be processed, the target data corresponding to each piece of data to be processed is determined.
5. The method according to claim 1, characterized in that After the step of splitting the data to be stored into at least one data to be processed is performed, the method further comprises: Based on the data to be stored, location information corresponding to each piece of data to be processed is determined.
6. The method according to claim 5, characterized in that The step of generating an identification code corresponding to each target data, and generating and storing a storage identification code corresponding to the data to be stored according to the identification code corresponding to each target data, comprises: Determine the location information corresponding to each target data according to the location information corresponding to each data to be processed; According to the location information corresponding to each target data and the identification code corresponding to each target data, the storage identification code corresponding to the data to be stored is determined.
7. A data processing method, characterized in that: include: receiving a data read instruction, wherein the data read instruction carries a storage identification code, and the storage identification code consists of an identification code; Determine multiple identification codes based on the stored identification code, and determine the target data corresponding to each identification code, wherein the identification code is an identification code corresponding to the target data stored in a preset coding table; Determine the data to be processed corresponding to each target data according to the segmentation rule and the preset coding table, wherein the segmentation rule is determined based on the amount of the data to be processed, the segmentation rule is used to divide the preset coding table into data intervals corresponding to the data to be processed, and the data to be processed is calculated based on the data interval corresponding to the corresponding target data; The data to be stored corresponding to the storage identification code is determined based on each data to be processed.
8. The method according to claim 7, characterized in that The step of determining the data to be processed corresponding to each target data according to the segmentation rule and the preset coding table includes: Determine the data interval corresponding to each target data according to the segmentation rule and the preset coding table; The data to be processed corresponding to each target data is calculated according to the data interval corresponding to each target data.
9. A data processing device, characterized in that: include: An acquisition module is configured to acquire data to be stored and split the data to be stored into at least one data to be processed; A determination module, configured to determine a segmentation rule according to the amount of data to be processed; A processing module is configured to determine target data corresponding to each to-be-processed data based on the segmentation rule and a preset coding table, wherein the target data is calculated based on a data interval corresponding to the to-be-processed data, and the data interval is obtained by dividing the preset coding table based on the segmentation rule; A generation module is configured to generate an identification code corresponding to each target data, and generate and store a storage identification code corresponding to the data to be stored according to the identification code corresponding to each target data, wherein the identification code is the identification code corresponding to the target data stored in the preset coding table, and the storage identification code is composed of the identification code.
10. A data processing device, characterized in that: include: A receiving module is configured to receive a data read instruction, wherein the data read instruction carries a storage identification code, and the storage identification code consists of an identification code; A first determination module is configured to determine a plurality of identification codes based on the stored identification code, and determine target data corresponding to each identification code, wherein the identification code is an identification code corresponding to the target data stored in a preset coding table; A second determination module is configured to determine the to-be-processed data corresponding to each target data according to a segmentation rule and a preset coding table, wherein the segmentation rule is determined based on the amount of the to-be-processed data, the segmentation rule is used to divide the preset coding table into data intervals corresponding to the to-be-processed data, and the to-be-processed data is calculated based on the data interval corresponding to the corresponding target data; The third determination module is configured to determine the to-be-stored data corresponding to the storage identification code based on each to-be-processed data.
11. A computing device, characterized in that: include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the steps of the data processing method described in any one of claims 1-6 or 7-8.
12. A computer-readable storage medium storing computer instructions, characterized in that: When the instruction is executed by the processor, the steps of the data processing method described in any one of claims 1-6 or 7-8 are implemented.
Citation Information
Patent Citations
Spaceborne SAR (synthetic aperture radar) original data BAQ compression method capable of dynamically configuring compression ratio
CN108872940A
Data compression method, device and equipment and computer readable storage medium
CN111262587A