CN110545108B - Data processing method and device, electronic equipment and computer readable storage medium - Google Patents

Data processing method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN110545108B
CN110545108B CN201910849423.3A CN201910849423A CN110545108B CN 110545108 B CN110545108 B CN 110545108B CN 201910849423 A CN201910849423 A CN 201910849423A CN 110545108 B CN110545108 B CN 110545108B
Authority
CN
China
Prior art keywords
data
unit
type
subunits
length
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910849423.3A
Other languages
Chinese (zh)
Other versions
CN110545108A (en
Inventor
陆舟
于华章
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Feitian Technologies Co Ltd
Original Assignee
Feitian Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Feitian Technologies Co Ltd filed Critical Feitian Technologies Co Ltd
Priority to CN201910849423.3A priority Critical patent/CN110545108B/en
Publication of CN110545108A publication Critical patent/CN110545108A/en
Application granted granted Critical
Publication of CN110545108B publication Critical patent/CN110545108B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/70Type of the data to be coded, other than image and sound

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The present application relates to the field of information security technologies, and in particular, to a data processing method and apparatus, an electronic device, and a computer-readable storage medium. The method is applied to a computer terminal comprising a processor and an input device, and comprises the following steps: s101, acquiring an operation instruction input by a user through input equipment; step S102, the processor acquires a corresponding original data set based on an operation instruction input by a user, wherein the original data set comprises data units; step S103, the processor selects an unprocessed data unit from the data units contained in the original data group, and determines the data type and the data length information based on the numerical value corresponding to the data unit; and decompressing the corresponding data subunit based on the determined data length and the data type, and storing the decompressed data in the new data group. According to the application, data decompression is realized, and the decompression processing rate and the data transmission speed are improved.

Description

Data processing method and device, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the field of information security technologies, and in particular, to a data processing method and apparatus, an electronic device, and a computer-readable storage medium.
Background
With the rapid development of electronic information technology, in computer science and information theory, decompression processing or source decoding is a process of representing information by using fewer data bits or other information-related units than those without decoding according to a specific decoding mechanism.
As the name implies, the conventional decompression processing is a technical method for integrally decompressing data without losing useful information, and decompressing the data by releasing the data amount, so as to improve the data decompression efficiency, or organizing and splitting the data according to a certain algorithm, and then releasing the compressed data. How to decompress data by other data processing methods, and further improve the decompression processing rate and the data transmission speed becomes a technical problem to be solved urgently at present.
Disclosure of Invention
The application provides a data processing method, a data processing device, an electronic device and a computer-readable storage medium, so as to decompress data and further improve the decompression processing rate and the data transmission speed.
In a first aspect, a data processing method is provided, which is applied to a computer terminal including a processor and an input device, and includes the following steps:
s101, acquiring an operation instruction input by a user through input equipment;
step S102, the processor acquires a corresponding original data set based on an operation instruction input by a user, wherein the original data set comprises data units;
step S103, the processor selects an unprocessed data unit from the data units contained in the original data set, and determines the data type and the data length information based on the numerical value corresponding to the data unit;
when the determined data length information is the data length unoccupied bytes, the processor determines the numerical value corresponding to the data unit as the data length corresponding to the data unit, decompresses the corresponding data sub-unit based on the data length and the data type, and stores the decompressed data in a new data group;
when the determined data length information is the data length occupied byte, the processor determines the byte number occupied by the data length based on the numerical value corresponding to the data unit, determines the data length corresponding to the data unit based on the byte number, decompresses the corresponding data subunit based on the data length and the data type, and stores the decompressed data in a new data group.
In one possible implementation, the processor determines a data length corresponding to the data unit based on the number of bytes, including:
the processor sequentially searches all corresponding bytes in the original data group based on the number of bytes to obtain the numerical values of all corresponding bytes;
and the processor determines the numerical value as the data length corresponding to the data unit.
In one possible implementation, the decompressing, by the processor, the corresponding data sub-unit based on the data length and the data type includes:
the processor selects a data subunit with corresponding data length based on the data length;
and the processor performs reverse analysis processing on the data subunit based on the data unit format corresponding to the data type to obtain corresponding decompressed data.
In one possible implementation, the performing, by the processor, reverse parsing the data sub-unit based on a data unit format corresponding to the data type to obtain corresponding decompressed data includes:
when the data length does not occupy bytes, the processor selects the data subunits corresponding to the data length according to the determined data length and sequentially determines the data type corresponding to each data subunit; performing reverse analysis processing on the data subunit based on the data unit format corresponding to the determined data type to obtain corresponding data; and repeating the processing until all the data subunits in the data subunits with the corresponding data length obtain the corresponding data through reverse analysis processing.
In one possible implementation, the performing, by the processor, reverse parsing the data sub-unit based on a data unit format corresponding to the data type to obtain corresponding decompressed data includes:
when the data length occupies bytes, the processor selects a data subunit with the corresponding data length based on the occupied bytes; the selected data subunits are data subunits in sequence at the positions of the current data units; sequentially selecting data subunits from the data subunits with corresponding data lengths, and determining the data types of the selected data subunits; carrying out reverse analysis processing on the data subunits based on the data unit format corresponding to the determined data type to obtain corresponding data; and repeating the processing until all the data subunits in the data subunits with the corresponding data length obtain the corresponding data through reverse analysis processing.
In one possible implementation, the number of bytes occupied by the data length includes any one of:
one byte;
two bytes;
four bytes;
eight bytes;
other number of bytes.
In one possible implementation, the computer terminal further includes a memory, the method further comprising:
and when the determined data type is the specific type, the processor directly decompresses the data unit based on a preset processing mode corresponding to the specific type, and the memory stores the decompressed data in a new data set.
In a second aspect, a data processing apparatus is provided, including:
the first acquisition unit is used for acquiring an operation instruction input by a user;
the second acquisition unit is used for acquiring a corresponding original data set based on an operation instruction input by a user, wherein the original data set comprises a data unit;
the first processing unit is used for selecting an unprocessed data unit from the data units contained in the original data group and determining the data type and the data length information based on the numerical value corresponding to the data unit; when the determined data length information is a data length unoccupied byte, determining a numerical value corresponding to the data unit as a data length corresponding to the data unit, decompressing the corresponding data sub-unit based on the data length and the data type, and storing the decompressed data in a new data group; and when the determined data length information is a data length occupied byte, determining the byte number occupied by the data length based on the numerical value corresponding to the data unit, determining the data length corresponding to the data unit based on the byte number, decompressing the corresponding data sub-unit based on the data length and the data type, and storing the decompressed data in a new data group.
In a possible implementation manner, the first processing unit is configured to sequentially search all corresponding bytes in the original data group based on the number of bytes, and obtain values of all corresponding bytes; and determining the numerical value as the data length corresponding to the data unit.
In one possible implementation manner, the first processing unit is configured to select a data sub-unit of a corresponding data length based on the data length; and carrying out reverse analysis processing on the data subunits based on the data unit format corresponding to the data type to obtain corresponding decompressed data.
In a possible implementation manner, the first processing unit is specifically configured to, when the data length does not occupy bytes, select a data subunit with a corresponding data length according to the determined data length, and sequentially determine a data type corresponding to each data subunit; carrying out reverse analysis processing on the data subunits based on the data unit format corresponding to the determined data type to obtain corresponding data; and repeating the processing until all the data subunits in the data subunits with the corresponding data length obtain the corresponding data through reverse analysis processing.
In one possible implementation manner, the first processing unit is specifically configured to, when the data length occupies bytes, select a data subunit of a corresponding data length based on the occupied bytes; the selected data subunits are data subunits in sequence at the positions of the current data units; sequentially selecting data subunits from the data subunits with corresponding data lengths, and determining the data types of the selected data subunits; performing reverse analysis processing on the data subunit based on the data unit format corresponding to the determined data type to obtain corresponding data; and repeating the processing until all the data subunits in the data subunits with the corresponding data length obtain the corresponding data through reverse analysis processing.
In one possible implementation, the number of bytes occupied by the data length includes any one of:
one byte;
two bytes;
four bytes;
eight bytes;
other number of bytes.
In one possible implementation, the method further includes:
and the second processing unit is used for directly decompressing the data unit based on a preset processing mode corresponding to the specific type and storing the decompressed data in a new data set when the determined data type is the specific type.
In a third aspect, an electronic device is provided, including: a processor and a memory;
the memory is used for storing operation instructions;
the processor is used for executing the data processing method by calling the operation instruction.
In a fourth aspect, a computer-readable storage medium is provided for storing computer instructions which, when executed on a computer, cause the computer to perform the above-described data processing method.
By means of the technical scheme, the technical scheme provided by the application at least has the following advantages:
compared with the prior art, the data decompression method and device have the advantages that data decompression is achieved, and decompression processing rate and data transmission speed are improved.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the embodiments of the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a schematic flow chart of a data processing method provided in the present application;
FIG. 2 is a schematic processing flow diagram of one possible implementation of the data processing method provided in the present application;
fig. 3 is a schematic structural diagram of a data processing apparatus provided in the present application;
fig. 4 is a schematic structural diagram of an electronic device of the data processing method provided in the present application.
Detailed Description
The present application provides a data processing method, an apparatus, an electronic device, and a computer-readable storage medium, and the following describes in detail embodiments of the present application with reference to the accompanying drawings.
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are exemplary only for explaining the present application and are not construed as limiting the present application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those within the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
As shown in fig. 1, a schematic flow chart of a data processing method provided in the present application, which is applied to a computer terminal including a processor and an input device, includes the following steps:
s101, acquiring an operation instruction input by a user through input equipment;
step S102, the processor acquires a corresponding original data set based on an operation instruction input by a user;
wherein, the original data group comprises data units;
step S103, the processor selects an unprocessed data unit from the data units contained in the original data group, and determines the data type and the data length information based on the numerical value corresponding to the data unit;
when the determined data length information is the data length unoccupied byte, the processor determines the numerical value corresponding to the data unit as the data length corresponding to the data unit, decompresses the corresponding data subunit based on the data length and the data type, and stores the decompressed data in a new data group;
when the determined data length information is the data length occupied byte, the processor determines the byte number occupied by the data length based on the numerical value corresponding to the data unit, determines the data length corresponding to the data unit based on the byte number, decompresses the corresponding data sub-unit based on the data length and the data type, and stores the decompressed data in a new data group.
According to the application, data decompression is realized, and the decompression processing rate and the data transmission speed are improved.
Based on the technical solutions provided in the foregoing application, the following technical solutions are explained in detail, in which a computer terminal included in a system is taken as an execution subject to be explained, the computer terminal includes a processor, an input device, and a memory, as shown in fig. 2, which is a specific processing flowchart of one possible implementation manner of the data processing method provided in the present application.
Step S201: the input device acquires an operation instruction input by a user.
In one possible implementation manner, when a user wishes to perform the following operations, the user inputs an operation instruction corresponding to each operation on the input device to enable the corresponding operation to be subsequently executed; the operations may include (registration operation, authentication operation, PIN code setting operation, PIN code modification operation, device name modification operation, and PIN remaining number modification operation), and the like.
In step S202, the processor obtains a corresponding original data set based on an operation instruction input by the user.
In a possible implementation manner, the database of the computer terminal stores the corresponding relationship between each operation instruction and each original data set in advance, so that after the input device acquires the operation instruction input by the user, the processor finds the original data set corresponding to the operation instruction based on the corresponding relationship between the operation instruction and the original data set stored in advance in the database. For each original data set, at least two data units are included therein.
In step S203, the processor determines the data type and data length information of the data unit in the original data set.
In one possible implementation, when an unprocessed data unit selected from the data units included in the original data set is a first selected data unit, the processor selects a first-ranked data unit from the acquired original data set, and determines the data type and data length information of the data unit based on a value corresponding to the data unit.
Specifically, after the processor obtains the value corresponding to the selected data unit, the processor queries the corresponding value table based on the value, and directly queries to obtain the data type and data length information corresponding to the data unit.
The data types corresponding to the data units can be divided into seven types according to requirements, wherein the seven types are respectively a dictionary type, an array type, an unsigned integer type, a negative integer type, a character string type, a byte type and a specific type.
And step S204, the processor decompresses the data subunit based on the determined data length and data type to obtain decompressed data.
In the embodiment of the present application, after determining the data type and the data length information of the data unit, the processor may further be divided into the following two processing manners for determining the data length according to the difference of the data length information:
(1) The data length information is data length unoccupied bytes.
In this embodiment of the application, when the data length information is that the data length does not occupy bytes, the processor determines the data length of the data unit, and may include the following processing:
the processor determines the value corresponding to the data unit as the data length corresponding to the data unit.
(2) The data length information is data length unoccupied bytes.
In this embodiment of the application, when the data length information is a byte occupied by the data length, the determining, by the processor, a byte occupied by the data length corresponding to the data unit may include:
the processor determines the number of bytes occupied by the data length based on the corresponding numerical value of the data unit.
Further, the processor determines a data length corresponding to the data unit based on the number of bytes, and may include:
the processor sequentially searches all corresponding bytes in the original data group based on the number of bytes to obtain the numerical values of all the bytes; and determining the numerical values of all the bytes as the data length corresponding to the data unit.
For the data unit format of each data type, the method may include:
when the data type of the data unit is a word typical type, creating and initializing a standard data unit format, setting the data type as the word typical type, setting the first flag bits as a preset number of data subunits, and storing the data units;
when the data type of the data unit is the array type, creating and initializing a standard data unit format, setting the data type as the array type, and storing the data unit;
when the data type of the data unit is an unsigned integer, creating and initializing a standard data unit format, setting the data type to be an unsigned integer, and setting a value corresponding to the data unit to be an acquired first data value;
when the data type of the data unit is a negative integer type, creating and initializing a standard data unit format, setting the data type to be an unsigned integer type, and setting the value corresponding to the data unit to be an acquired second data value;
when the data type of the data unit is a character string type, creating and initializing a standard data unit format, setting the data type to be an unsigned integer type, and setting a value corresponding to the data unit to be an acquired third data value;
when the data type of the data unit is byte type, creating and initializing a standard data unit format, setting the data type to be unsigned integer type, and setting the value corresponding to the data unit to be the acquired fourth data value;
and when the data type of the data unit is a specific type, creating and initializing a standard data unit format, setting the data type to be an unsigned integer type, and setting the value corresponding to the data unit to be the acquired fifth data value.
In one possible implementation, after determining the data length, the processor decompresses the corresponding data sub-unit based on the data length and the data type, and obtains decompressed data, including:
the processor selects a data subunit with corresponding data length based on the data length; and the processor performs reverse analysis processing on the data subunits based on the data unit format corresponding to the data type to obtain corresponding data.
In this embodiment of the present application, if the data type corresponding to the current data unit is any data type, the processor determines, based on a numerical value corresponding to the current data unit, that the data length of the data unit is an unoccupied byte, obtains the data length (len =0x00 … x 17) of the data unit, selects, according to the data length, a data subunit corresponding to the data length (len =0x00 … x 17), and sequentially determines the data type corresponding to each data subunit; carrying out reverse analysis processing on the data subunit based on the data unit format corresponding to the data type to obtain corresponding data; and repeating the processing until all the data subunits in the data subunits with the corresponding data length obtain corresponding data.
If the data type corresponding to the current data unit is any data type, the processor determines that the data length of the data unit occupies at least one byte based on the numerical value corresponding to the current data unit, determines the data length corresponding to the data unit based on the number of bytes, and selects a data subunit with corresponding data length according to the data length; the selected data subunits are data subunits in sequence of the current data unit. Sequentially selecting data subunits from the data subunits with corresponding data lengths, and determining the data types of the selected data subunits; carrying out reverse analysis processing on the data subunit based on the data unit format corresponding to the data type to obtain corresponding data; and repeating the processing until all the data subunits in the data subunits with the corresponding data length obtain corresponding data.
In one embodiment, if the data type corresponding to the current data unit is any data type, the processor determines that the data length occupies one byte, determines the data length (len =0x 18) corresponding to the data unit based on the one byte, selects a data sub-unit with a corresponding data length according to the data length, and determines the data type of the selected data sub-unit for each data sub-unit in sequence; performing reverse analysis processing on the data subunit based on the data unit format corresponding to the data type to obtain corresponding data; and repeating the processing until all the data subunits in the data subunits with the corresponding data length obtain corresponding data.
If the data type corresponding to the current data unit is any data type, the processor determines that the data length occupies two bytes, determines the data length (len =0x 19) corresponding to the data unit based on the two bytes, selects a data subunit with the corresponding data length according to the data length, and determines the data type of the selected data subunit for each data subunit in sequence; carrying out reverse analysis processing on the data subunit based on the data unit format corresponding to the data type to obtain corresponding data; and repeating the processing until all the data subunits in the data subunits with the corresponding data length obtain corresponding data.
If the data type corresponding to the current data unit is any data type, the processor determines that the data length occupies four bytes, determines the data length (len =0x1 a) corresponding to the data unit based on the four bytes, selects a data subunit with the corresponding data length according to the data length, and determines the data type of the selected data subunit for each data subunit in sequence; carrying out reverse analysis processing on the data subunit based on the data unit format corresponding to the data type to obtain corresponding data; and repeating the processing until all the data subunits in the data subunits with the corresponding data length obtain corresponding data.
If the data type corresponding to the current data unit is any data type, the processor determines that the data length occupies eight bytes, determines the data length (len =0x1 b) corresponding to the data unit based on the eight bytes, selects a data subunit with the corresponding data length according to the data length, and determines the data type of the selected data subunit for each data subunit in sequence; carrying out reverse analysis processing on the data subunit based on the data unit format corresponding to the data type to obtain corresponding data; and repeating the processing until all the data subunits in the data subunits with the corresponding data length obtain corresponding data.
If the data type corresponding to the current data unit is any data type, the processor determines that the data length occupies other number of bytes, determines the data length corresponding to the data unit based on the other number of bytes, selects the data sub-unit with the corresponding data length according to the data length, and determines the data type of the selected data sub-unit for each data sub-unit in sequence; carrying out reverse analysis processing on the data subunit based on the data unit format corresponding to the data type to obtain corresponding data; and repeating the processing until all the data subunits in the data subunits with the corresponding data length obtain corresponding data.
In one possible implementation, when the determined data type is a specific type, the processing of decompressing the data unit by the processor and storing the decompressed data in the new data set includes:
the processor directly decompresses the data unit based on the preset processing mode corresponding to the specific type, and the memory stores the decompressed data in the new data set.
Based on the technical solutions described above, the technical solutions disclosed in the present application are explained below with a specific example. The values of the data units in the original data set in the embodiment of the present application are hexadecimal values.
In this embodiment of the present application, a user needs to perform decompression processing, and an original data set obtained by a device based on an operation instruction of the decompression processing is:
Figure BDA0002196398140000091
based on the original data set, the process of obtaining a new data set after processing the original data set is as follows:
where 06 is a command header and a5 denotes start data.
Establishing a dictionary 1 based on a data unit a5 in an original data group, determining that the dictionary 1 has 5 data subunits, namely a first data subunit (01), wherein the data type is integer type, and the corresponding K is 1,V as 1; therefore, the reverse analysis processing is performed, and the corresponding data is 1:1. The format of the data unit written into the new data group is (K: V).
And continuously processing the subsequent data subunits, wherein the data type is integer type, the corresponding K is 2,V is 3, and the obtained corresponding data is 2:3.
Continue parsing the next data subunit:
Figure BDA0002196398140000092
Figure BDA0002196398140000101
through analysis, K is determined to be 3, a5 corresponds to a string of character strings, and then the dictionary 2 is established based on the a 5. Continuing to process the data sub-unit behind the a5, wherein the data sub-unit is an integer type, K is 1,V and is 2, and the obtained data unit is (1:2); continuing to process the following data subunits, determining that K is 3, determining that the data length corresponding to 38 is the next byte, namely 18, by table lookup, analyzing 18 to obtain-25, namely a V value, and then determining that the data unit is (3: 25); continuing to process the following data subunits, determining that K corresponding to 20 is-1, V corresponding to 01 is 1 and the data unit is (-1:1) by table look-up; continuing to process the following data subunits, determining that K corresponding to 21 is-2, the data length corresponding to 58 is the next byte, namely 20, and determining that the data length corresponding to 20 is 32 data subunits, then carrying out the pair
Figure BDA0002196398140000102
Performing reverse analysis to obtain a value h '927E37CBA242A4884CC0DC9D15317E92923821EF9F2124474B5ECC13613B7AEE', namely a V value; then the data unit is (-2 h '927e37CBA2424884CC0DC9D15317e923821EF9F21274B5ECC13613B7AEE'); continuing to process the following data subunits, determining that K corresponding to 22 is-3, the data length corresponding to 58 is the next byte, namely 20, and determining that the data length corresponding to 20 is 32 data subunits, then carrying out the pair
Figure BDA0002196398140000103
Performing reverse analysis to obtain a value h 'E1B39E1381889C2EB54D2C696D9AF74CDFEA678046EFE81BA5A7427C22CA952A', which is a V value; then the data unit is (-3 h 'E1B39E1381889C2EB54D2C696D9AF74CDFEA678046EFE81BA5A7427C22CA952A').
The above data is written in the dictionary 2.
Continuing to process the following data subunits, if K is 4, and the data length corresponding to 50 is 16 data subunits, then performing the pair
Figure BDA0002196398140000104
Figure BDA0002196398140000111
Performing reverse analysis to obtain a value h '6F8E2117CBFA99E6C7DF7DEFDC973851', namely a V value; the data unit is (4 h ″ -6F8E2117CBFA99E6C7DF7DEDEFD 973851').
Continuing to process the following data subunits, wherein K is 5, the data length corresponding to 58 is the next byte, namely 40, and if the data length corresponding to 40 is determined to be 64 data subunits, then carrying out the processing on the following data subunits
Figure BDA0002196398140000112
The value obtained by reverse analysis was h '67F2C94FE054A7B6C3EFA4A 204FB96FEE9D0D3A94481CD554FC9FA62DF83D39D98303F5671E91D9DD3AB585BC69918F3E794B03DA6D8A6EC466F544AF55158', which was the V value; <xnotran> (5:h'67F2C94FE054A7B6C3EFA4A4A204FB96FEE9D0D3A94481CD554FC9FA62DF83D39D98303F5671E91D9DD3AB585BC69918F3E794B03DA6D8A6EC466F544AF55158'). </xnotran>
The above data is written in the dictionary 1. After all the data are written into the corresponding positions, a new data set is obtained, which is:
{1:1,2:3,3:{1:2,3:-25,-1:1,-2:h'927E37CBA242A4884CC0DC9D15317E92923821EF9F2124474B5ECC13613B7AEE',-3:h'E1B39E1381889C2EB54D2C696D9AF74CDFEA678046EFE81BA5A7427C22CA952A'},4:h'6F8E2117CBFA99E6C7DF7DEFDC973851',5:h'67F2C94FE054A7B6C3EFA4A4A204FB96FEE9D0D3A94481CD554FC9FA62DF83D39D98303F5671E91D9DD3AB585BC69918F3E794B03DA6D8A6EC466F544AF55158'}。
of course, the execution sequence in the embodiment of the present application is only for illustrating one possible execution scheme of the technical solution of the present application, but is not limited to the execution sequence in the embodiment.
According to the application, data decompression is realized, and the decompression processing rate and the data transmission speed are improved.
Based on the above technical solution of the data processing method provided by the present application, the present application correspondingly provides a schematic structural diagram of a data processing apparatus, and as shown in fig. 3, the data processing apparatus 30 of the present application may include: a first acquisition unit 31, a second acquisition unit 32, a first processing unit 33, and a second processing unit 34.
A first acquisition unit 31 for acquiring an operation instruction input by a user;
a second obtaining unit 32, configured to obtain a corresponding original data group based on an operation instruction input by a user, where the original data group includes a data unit;
the first processing unit 33 is configured to select an unprocessed data unit from the data units included in the original data set, and determine a data type and data length information based on a value corresponding to the data unit; when the determined data length information is the data length unoccupied bytes, determining the numerical value corresponding to the data unit as the data length corresponding to the data unit, decompressing the corresponding data sub-unit based on the data length and the data type, and storing the decompressed data in a new data group; and when the determined data length information is the data length occupied byte, determining the byte number occupied by the data length based on the numerical value corresponding to the data unit, determining the data length corresponding to the data unit based on the byte number, decompressing the corresponding data subunit based on the data length and the data type, and storing the decompressed data in a new data group.
In a possible implementation manner, the first processing unit 33 is configured to sequentially search all corresponding bytes in the original data set based on the number of bytes, and obtain the values of all corresponding bytes; and determining the value as the data length corresponding to the data unit.
In one possible implementation, the first processing unit 33 is configured to select a data sub-unit of a corresponding data length based on the data length; and carrying out reverse analysis processing on the data subunits based on the data unit format corresponding to the data type to obtain corresponding decompressed data.
In a possible implementation manner, the first processing unit 33 is specifically configured to, when the data length does not occupy a byte, select a data subunit corresponding to the data length according to the determined data length, and sequentially determine a data type corresponding to each data subunit; carrying out reverse analysis processing on the data subunits based on the data unit format corresponding to the determined data type to obtain corresponding data; and repeating the processing until all the data subunits in the data subunits with the corresponding data length obtain the corresponding data through reverse analysis processing.
In one possible implementation, the first processing unit 33 is specifically configured to, when the data length occupies bytes, select a data sub-unit of the corresponding data length based on the occupied bytes; the selected data subunits are data subunits in sequence at the positions of the current data units; sequentially selecting data subunits from the data subunits with corresponding data lengths, and determining the data types of the selected data subunits; carrying out reverse analysis processing on the data subunits based on the data unit format corresponding to the determined data type to obtain corresponding data; and repeating the processing until all the data subunits in the data subunits with the corresponding data length obtain the corresponding data through reverse analysis processing.
In one possible implementation, the number of bytes occupied by the data length includes any one of:
one byte;
two bytes;
four bytes;
eight bytes;
other number of bytes.
In one possible implementation manner, the second processing unit 34 is configured to, when the determined data type is a specific type, directly perform decompression processing on the data unit based on a preset processing manner corresponding to the specific type, and store the decompressed data in the new data set.
According to the data decompression method and device, data decompression is achieved, and the decompression processing rate and the data transmission speed are improved.
Referring now to FIG. 4, shown is a schematic diagram of an electronic device 400 suitable for use in implementing embodiments of the present application. The terminal device in the embodiments of the present application may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 4, electronic device 400 may include a processing device (e.g., central processing unit, graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage device 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic apparatus 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices, either wirelessly or by wire, to exchange data. While fig. 4 illustrates an electronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program, when executed by the processing device 401, performs the above-described functions defined in the methods of the embodiments of the present application.
It should be noted that the computer readable medium mentioned above in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring at least two internet protocol addresses; sending a node evaluation request comprising the at least two internet protocol addresses to node evaluation equipment, wherein the node evaluation equipment selects the internet protocol addresses from the at least two internet protocol addresses and returns the internet protocol addresses; receiving an internet protocol address returned by the node evaluation equipment; wherein the obtained internet protocol address indicates an edge node in the content distribution network.
Alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a node evaluation request comprising at least two internet protocol addresses; selecting an internet protocol address from the at least two internet protocol addresses; returning the selected internet protocol address; wherein the received internet protocol address indicates an edge node in the content distribution network.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the disclosure. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.
The electronic device provided in the present application is applicable to any embodiment of the data processing method described above, and is not described herein again.
According to the application, data decompression is realized, and the decompression processing rate and the data transmission speed are improved.
The present application provides a computer-readable storage medium storing computer instructions that cause a computer to execute the data processing method shown in the above-described embodiment.
The computer-readable storage medium provided in the present application is applicable to any embodiment of the data processing method on the terminal device side and the data processing method on the key device side, and details are not repeated here.
According to the data decompression method and device, data decompression is achieved, and the decompression processing rate and the data transmission speed are improved.
It will be understood by those within the art that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. Those skilled in the art will appreciate that the computer program instructions may be implemented by a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, implement the aspects specified in the block or blocks of the block diagrams and/or flowchart illustrations disclosed herein.
The modules of the device can be integrated into a whole or can be separately deployed. The modules can be combined into one module, and can also be further split into a plurality of sub-modules.
Those skilled in the art will appreciate that the drawings are merely schematic representations of one preferred embodiment and that the blocks or flow diagrams in the drawings are not necessarily required to practice the present application.
Those skilled in the art will appreciate that the modules in the devices in the embodiments may be distributed in the devices in the embodiments according to the description of the embodiments, and may be correspondingly changed in one or more devices different from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
The above application serial numbers are for descriptive purposes only and do not represent the merits of the embodiments.
The disclosure of the present application is only a few specific embodiments, but the present application is not limited to these, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (10)

1. A data processing method is applied to a computer terminal comprising a processor and an input device, and comprises the following steps:
s101, the input equipment acquires an operation instruction input by a user;
step S102, the processor acquires a corresponding original data set based on an operation instruction input by a user, wherein the original data set comprises data units;
step S103, the processor selects an unprocessed data unit from the data units contained in the original data group, and determines the data type and the data length information based on the numerical value corresponding to the data unit;
when the determined data length information is the data length unoccupied byte, the processor determines that the numerical value corresponding to the data unit is the data length corresponding to the data unit, decompresses the corresponding data sub-unit based on the data length and the data type, and stores the decompressed data in a new data group; wherein the decompressing the corresponding data sub-unit based on the data length and the data type includes: selecting subunits with corresponding data lengths based on the data lengths, and sequentially determining the data types corresponding to the data subunits; carrying out reverse analysis processing on the data subunits based on the data unit format corresponding to the determined data type to obtain corresponding data; repeating the processing until all the data subunits in the data subunits with the corresponding data length obtain the corresponding data through reverse analysis processing;
when the determined data length information is a data length occupied byte, the processor determines the byte number occupied by the data length based on the numerical value corresponding to the data unit, determines the data length corresponding to the data unit based on the byte number, decompresses the corresponding data sub-unit based on the data length and the data type, and stores the decompressed data in a new data group; wherein the decompressing the corresponding data sub-unit based on the data length and the data type includes: selecting a data subunit with corresponding data length based on the byte number; the selected data subunits are data subunits in sequence at the positions of the current data units; sequentially selecting data subunits from the data subunits with corresponding data lengths, and determining the data types of the selected data subunits; carrying out reverse analysis processing on the data subunits based on the data unit format corresponding to the determined data type to obtain corresponding data; repeating the processing until all the data subunits in the data subunits with the corresponding data length obtain the corresponding data through reverse analysis;
the data types include: word type, array type, unsigned integer type, negative integer type, string type, byte type, and specific type.
2. The method of claim 1, wherein the processor determines a data length corresponding to the data unit based on the number of bytes, comprising:
the processor sequentially searches all corresponding bytes in the original data group based on the number of bytes to obtain the numerical values of all corresponding bytes;
and the processor determines the numerical value as the data length corresponding to the data unit.
3. The method of claim 1, wherein the number of bytes occupied by the data length comprises any of:
one byte;
two bytes;
four bytes;
eight bytes;
other number of bytes.
4. The method of any one of claims 1-3, wherein the computer terminal further comprises a memory, the method further comprising:
and when the determined data type is the specific type, the processor directly decompresses the data unit based on a preset processing mode corresponding to the specific type, and the memory stores the decompressed data in a new data set.
5. A data processing apparatus, characterized by comprising:
the first acquisition unit is used for acquiring an operation instruction input by a user;
the second acquisition unit is used for acquiring a corresponding original data set based on an operation instruction input by a user, wherein the original data set comprises a data unit;
the first processing unit is used for selecting an unprocessed data unit from the data units contained in the original data group and determining the data type and the data length information based on the numerical value corresponding to the data unit;
the first processing unit is further configured to determine, when the determined data length information is a data length unoccupied byte, that a numerical value corresponding to the data unit is the data length corresponding to the data unit, decompress the corresponding data sub-unit based on the data length and the data type, and store the decompressed data in a new data group; wherein, the decompressing the corresponding data subunit based on the data length and the data type includes: selecting subunits with corresponding data lengths based on the data lengths, and sequentially determining the data types corresponding to the data subunits; carrying out reverse analysis processing on the data subunits based on the data unit format corresponding to the determined data type to obtain corresponding data; repeating the processing until all the data subunits in the data subunits with the corresponding data length obtain respective corresponding data through reverse analysis processing;
the first processing unit is further configured to, when the determined data length information is a data length occupied byte, determine a byte number occupied by the data length based on a numerical value corresponding to the data unit, determine a data length corresponding to the data unit based on the byte number, decompress the corresponding data sub-unit based on the data length and the data type, and store the decompressed data in a new data group; wherein the decompressing the corresponding data sub-unit based on the data length and the data type includes: selecting a data subunit with corresponding data length based on the byte number; the selected data subunits are data subunits in sequence at the positions of the current data units; sequentially selecting data subunits from the data subunits with corresponding data lengths, and determining the data types of the selected data subunits; performing reverse analysis processing on the data subunit based on the data unit format corresponding to the determined data type to obtain corresponding data; repeating the processing until all the data subunits in the data subunits with the corresponding data length obtain the corresponding data through reverse analysis;
the data types include: word type, array type, unsigned integer type, negative integer type, string type, byte type, and specific type.
6. The apparatus of claim 5, wherein the first processing unit is configured to sequentially search all corresponding bytes in the original data group based on the number of bytes, and obtain values of all corresponding bytes; and determining the numerical value as the data length corresponding to the data unit.
7. The apparatus of claim 5, wherein the data length occupies a number of bytes comprising any of:
one byte;
two bytes;
four bytes;
eight bytes;
other number of bytes.
8. The apparatus of any one of claims 5-7, further comprising:
and the second processing unit is used for directly decompressing the data unit based on a preset processing mode corresponding to the specific type and storing the decompressed data in a new data set when the determined data type is the specific type.
9. An electronic device, comprising: a processor and a memory;
the memory is used for storing operation instructions;
the processor is configured to execute the data processing method according to any one of the above claims 1 to 4 by calling the operation instruction.
10. A computer-readable storage medium for storing computer instructions which, when executed on a computer, cause the computer to perform the data processing method of any one of the preceding claims 1 to 4.
CN201910849423.3A 2019-09-09 2019-09-09 Data processing method and device, electronic equipment and computer readable storage medium Active CN110545108B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910849423.3A CN110545108B (en) 2019-09-09 2019-09-09 Data processing method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910849423.3A CN110545108B (en) 2019-09-09 2019-09-09 Data processing method and device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110545108A CN110545108A (en) 2019-12-06
CN110545108B true CN110545108B (en) 2022-12-20

Family

ID=68713095

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910849423.3A Active CN110545108B (en) 2019-09-09 2019-09-09 Data processing method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110545108B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6388585B1 (en) * 1998-08-11 2002-05-14 Matsushita Electric Ind Co Ltd Method for data compression and decompression using decompression instructions
CN103365648A (en) * 2012-03-30 2013-10-23 富士通株式会社 Compression and decompression system, compression apparatus, decompression apparatus and compression and decompression method
CN106664100A (en) * 2014-09-24 2017-05-10 英特尔公司 Technologies for efficient lz77-based data decompression
CN108989813A (en) * 2018-07-19 2018-12-11 叶涵 A kind of high efficiency of compression/decompression method, computer installation and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6388585B1 (en) * 1998-08-11 2002-05-14 Matsushita Electric Ind Co Ltd Method for data compression and decompression using decompression instructions
CN103365648A (en) * 2012-03-30 2013-10-23 富士通株式会社 Compression and decompression system, compression apparatus, decompression apparatus and compression and decompression method
CN106664100A (en) * 2014-09-24 2017-05-10 英特尔公司 Technologies for efficient lz77-based data decompression
CN108989813A (en) * 2018-07-19 2018-12-11 叶涵 A kind of high efficiency of compression/decompression method, computer installation and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
数据快速压缩算法的研究以及C语言实现;安建梅等;《价值工程》;20121218(第35期);全文 *

Also Published As

Publication number Publication date
CN110545108A (en) 2019-12-06

Similar Documents

Publication Publication Date Title
CN109656923B (en) Data processing method and device, electronic equipment and storage medium
CN108733317B (en) Data storage method and device
CN111368519B (en) Method, device, equipment and storage medium for editing online form
CN115757400A (en) Data table processing method and device, electronic equipment and computer readable medium
CN110489474B (en) Data processing method, device, medium and electronic equipment
CN110852720A (en) Document processing method, device, equipment and storage medium
CN110545108B (en) Data processing method and device, electronic equipment and computer readable storage medium
CN110545107B (en) Data processing method and device, electronic equipment and computer readable storage medium
CN110765238A (en) Data encryption query method and device
CN113157695B (en) Data processing method and device, readable medium and electronic equipment
CN111782895B (en) Retrieval processing method and device, readable medium and electronic equipment
CN112000667B (en) Method, apparatus, server and medium for retrieving tree data
CN115062590A (en) Information processing method, device, terminal and storage medium
CN111737572A (en) Search statement generation method and device and electronic equipment
CN115374320B (en) Text matching method and device, electronic equipment and computer medium
CN115348260B (en) Information processing method, device, equipment and medium based on campus information security
CN110780898A (en) Page data upgrading method and device and electronic equipment
CN116186093B (en) Address information processing method, address information processing device, electronic equipment and computer readable medium
CN115617818B (en) Batch updating method, electronic device and storage medium for MPT trees in block chain
CN115225586B (en) Data packet transmitting method, device, equipment and computer readable storage medium
CN116541421B (en) Address query information generation method and device, electronic equipment and computer medium
CN111382389B (en) Multi-theme page generation method and device, electronic equipment and storage medium
CN115994120B (en) Data file merging method, device, electronic equipment and computer readable medium
WO2022237428A1 (en) Method and apparatus for processing network request information, and device and storage medium
CN110908867B (en) Task completion judging method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant