CN104408192B - The compression processing method and device of character string type row - Google Patents

The compression processing method and device of character string type row Download PDF

Info

Publication number
CN104408192B
CN104408192B CN201410779397.9A CN201410779397A CN104408192B CN 104408192 B CN104408192 B CN 104408192B CN 201410779397 A CN201410779397 A CN 201410779397A CN 104408192 B CN104408192 B CN 104408192B
Authority
CN
China
Prior art keywords
character
key assignments
tandem
string value
data
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
CN201410779397.9A
Other languages
Chinese (zh)
Other versions
CN104408192A (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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology 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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201410779397.9A priority Critical patent/CN104408192B/en
Publication of CN104408192A publication Critical patent/CN104408192A/en
Application granted granted Critical
Publication of CN104408192B publication Critical patent/CN104408192B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1737Details of further file system functions for reducing power consumption or coping with limited storage space, e.g. in mobile devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention discloses the compression processing method and device of a kind of character string type row.This method includes:Determine processing data table to be compressed;The character tandem in processing data table to be compressed is determined, wherein, character string is classified as in processing data table to be compressed as the row of character string type;Key assignments corresponding to string value in character tandem is determined, wherein, key assignments is the value of data type;String value in character tandem is replaced with into key assignments corresponding with string value in character tandem;The first storage index is obtained, wherein, the corresponding index that the first storage index creates for the key assignments according to corresponding to string value in character tandem;And processing is compressed to processing data table to be compressed according to the first storage index.By the present invention, solve the problems, such as low for the row compression treatment effeciency of character string type in the prior art.

Description

The compression processing method and device of character string type row
Technical field
The present invention relates to data processing field, compression processing method in particular to a kind of character string type row and Device.
Background technology
In database storage techniques, row storage index is to be stored according to row.The benefit of row storage index is energy The performance of database is substantially improved, and by row storage compress technique space use is greatly reduced.
Row storage is by that together, can use duplicate data to greatest extent, be pressed the data storage of same row Contracting.In database, different types of data, also have a great impact for the efficiency of compression.Character string type is grown due to it The variable and character string itself of degree is bigger to space hold, is not very friendly for compression.Therefore compression processing effect Rate is low.
The problem for the treatment of effeciency is low is compressed for the row in the prior art for character string type, is not yet proposed at present effective Solution.
The content of the invention
It is existing to solve it is a primary object of the present invention to provide a kind of compression processing method and device of character string type row There are the row in technology for character string type to compress the problem for the treatment of effeciency is low.
To achieve these goals, according to an aspect of the invention, there is provided at a kind of compression of character string type row Reason method.
Included according to the compression processing method that the character string type of the present invention arranges:Determine processing data table to be compressed;It is determined that Character tandem in processing data table to be compressed, wherein, character string is classified as in processing data table to be compressed as character string type Row;Key assignments corresponding to string value in character tandem is determined, wherein, key assignments is the value of data type;By character in character tandem String value replaces with key assignments corresponding with string value in character tandem;The first storage index is obtained, wherein, the first storage index is The corresponding index created according to key assignments corresponding to string value in character tandem;And according to the first storage index to be compressed Processing data table is compressed processing.
Further, by string value in character tandem replace with key assignments corresponding with string value in character tandem it Afterwards, and before the first storage index is obtained, this method also includes:Replaced with and character by string value in character tandem In tandem after key assignments corresponding to string value, the key assignments after replacing is obtained;And according to the number of key assignments generation first after replacement According to table, wherein, the first tables of data is to be stored with the key assignments after replacing and processing data table to be compressed to remove outside character tandem Tables of data.
Further, it is determined that in character tandem after key assignments corresponding to string value, and by word in character tandem Before symbol string value replaces with key assignments corresponding with string value in character tandem, this method also includes:The second tables of data is created, its In, the second tables of data is used for the data for storing key assignments corresponding to string value in string value and character tandem in character tandem Table, after processing is compressed to character tandem according to the first storage index, this method also includes:The first view is created, its In, the first view is the view of the first tables of data of connection and the second tables of data;And according to the first view display data information.
Further, after according to the first view display data information, this method also includes:Obtain data to be checked;Connect Query statement is received, wherein, query statement is the instruction for indicating inquiry;And treated according to query statement in the first view Inquire about data and perform inquiry operation.
Further, obtaining the first storage index includes:Determine the second storage rope corresponding to string value in character tandem Draw;The index according to corresponding to creating key assignments corresponding to string value in character tandem;And according to string value in character tandem Index corresponding to corresponding key assignments replaces the second storage index, obtains the first storage index.
To achieve these goals, according to another aspect of the present invention, there is provided at a kind of compression of character string type row Manage device.
Included according to the compression treatment device that the character string type of the present invention arranges:First determining unit, for determining to wait to press Contracting processing data table;Second determining unit, for determining the character tandem in processing data table to be compressed, wherein, character tandem To be the row of character string type in processing data table to be compressed;3rd determining unit, for determining string value in character tandem Corresponding key assignments, wherein, key assignments is the value of data type;Replacement unit, for by string value in character tandem replace with Key assignments corresponding to string value in character tandem;First acquisition unit, for obtaining the first storage index, wherein, the first storage Index the corresponding index created for the key assignments according to corresponding to string value in character tandem;And compression processing unit, it is used for Processing is compressed to processing data table to be compressed according to the first storage index.
Further, the device also includes:Second acquisition unit, for by string value in character tandem replace with In character tandem after key assignments corresponding to string value, the key assignments after replacing is obtained;And generation unit, after according to replacement Key assignments generate the first tables of data, wherein, the first tables of data be stored with replace after key assignments and processing data table to be compressed in Remove the tables of data outside character tandem.
Further, the device also includes:First creating unit, for creating the second tables of data, wherein, the second tables of data For storing the tables of data of key assignments corresponding to string value in string value and character tandem in character tandem, second create it is single Member, for creating the first view, wherein, the first view is the view of the first tables of data of connection and the second tables of data;And display Unit, for according to the first view display data information.
Further, the device also includes:3rd acquiring unit, for obtaining data to be checked;Receiving unit, for connecing Query statement is received, wherein, query statement is the instruction for indicating inquiry;And query unit, for being existed according to query statement Inquiry operation is performed to data to be checked in first view.
Further, first acquisition unit includes:Determining module, for determining in character tandem corresponding to string value Two storage indexes;Creation module, for index corresponding to the key assignments establishment according to corresponding to string value in character tandem;And replace Block is changed the mold, the second storage index is replaced for index corresponding to the key assignments according to corresponding to string value in character tandem, obtains the One storage index.
By the present invention, using following steps:Determine processing data table to be compressed;Determine in processing data table to be compressed Character tandem, wherein, character string is classified as in processing data table to be compressed as the row of character string type;Determine character in character tandem Key assignments corresponding to string value, wherein, key assignments is the value of data type;By string value in character tandem replace with character tandem Key assignments corresponding to string value;The first storage index is obtained, wherein, the first storage index is according to string value in character tandem The corresponding index that corresponding key assignments creates;And place is compressed to processing data table to be compressed according to the first storage index Reason, solve the problems, such as that to compress treatment effeciency low for the row of character string type in the prior art, and then lifting is to word Accord with the effect of the compression treatment effeciency of the row of string type.
Brief description of the drawings
The accompanying drawing for forming the part of the application is used for providing a further understanding of the present invention, schematic reality of the invention Apply example and its illustrate to be used to explain the present invention, do not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the flow chart of the compression processing method of character string type row according to a first embodiment of the present invention;
Fig. 2 is the flow chart of the compression processing method of character string type row according to a second embodiment of the present invention;And
Fig. 3 is the schematic diagram of the compression treatment device of character string type row according to embodiments of the present invention.
Embodiment
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the application can phase Mutually combination.Describe the present invention in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
In order that those skilled in the art more fully understand application scheme, below in conjunction with the embodiment of the present application Accompanying drawing, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described embodiment is only The embodiment of the application part, rather than whole embodiments.Based on the embodiment in the application, ordinary skill people The every other embodiment that member is obtained under the premise of creative work is not made, it should all belong to the model of the application protection Enclose.
It should be noted that term " first " in the description and claims of this application and above-mentioned accompanying drawing, " Two " etc. be for distinguishing similar object, without for describing specific order or precedence.It should be appreciated that so use Data can exchange in the appropriate case, so as to embodiments herein described herein.In addition, term " comprising " and " tool Have " and their any deformation, it is intended that cover it is non-exclusive include, for example, containing series of steps or unit Process, method, system, product or equipment are not necessarily limited to those steps clearly listed or unit, but may include without clear It is listing to Chu or for the intrinsic other steps of these processes, method, product or equipment or unit.
According to an embodiment of the invention, there is provided a kind of compression processing method of character string type row.
Fig. 1 is the flow chart of the compression processing method of character string type row according to a first embodiment of the present invention.Such as Fig. 1 institutes Show, this method includes steps S101 to step S106:
Step S101, determine processing data table to be compressed.
It is determined that need to perform the tables of data of compression processing.It is determined that the tables of data of needs execution compression processing has many sides Formula, for example, according to the selection instruction of external data, select to need to perform at compression in multiple tables of data according to the selection instruction Tables of data of reason etc..
Step S102, determine the character tandem in processing data table to be compressed.
The character tandem in processing data table to be compressed is determined, wherein, character string, which is classified as in processing data table to be compressed, is The row of character string type.
Herein, the row for determining the character string type in processing data table to be compressed are to find out the row that type is character string, For example, in database, processing data table to be compressed is StudentScore tables, contains student's surname in the StudentScore tables Tri- row of name Name, student performance Score and student address Address, wherein, Name and Address are character string type Row.
Step S103, determine key assignments corresponding to string value in character tandem.
Key assignments corresponding to string value in character tandem is determined, wherein, key assignments is the value of data type.
For example, confirm that processing data table to be compressed is key assignments corresponding to character tandem Address in StudentScore, Such as, AddressKey self-propagations arrange.
Step S104, string value in character tandem is replaced with into key assignments corresponding with string value in character tandem.
String value in character tandem is replaced with into key assignments corresponding with string value in character tandem.
For example, processing data table to be compressed is to include field AddressKey and Address in StudentScore.According to Update-Select sentences in SQL, it is that Address is replaced with StudentScore by processing data table to be compressed AddressKey.A kind of mode of the specific implementation step is as follows:
UPDATE StudentScore SET AddressKey=a.AddressKey FROM StudentAddress A, StudentScore b WHERE a.Address=b.Address are matched in Address fields, AddressKey in StudentAddress substitutes the Address in StudentScore.So after this step, it is to be compressed What is included in processing data table StudentScore is classified as Name, Score and AddressKey.
By the step, string value in character tandem is replaced with into key assignments corresponding with string value in character tandem. In to processing data table to be compressed character tandem perform compression processing when, be converted into in processing data table to be compressed with character The key assignments of value type corresponding to string value performs compression processing in tandem.The word in improving to processing data table to be compressed Symbol tandem is compressed the efficiency of processing.
Preferably, the compression processing method of character string type provided in an embodiment of the present invention row, by word in character tandem , should after symbol string value replaces with key assignments corresponding with string value in character tandem, and before the first storage index is obtained Method also includes:After string value in character tandem is replaced with into key assignments corresponding with string value in character tandem, obtain Take the key assignments after replacing;And the first tables of data is generated according to the key assignments after replacement, wherein, the first tables of data is to be stored with replacement The tables of data outside character tandem is removed in key assignments and processing data table to be compressed afterwards.
Specifically, can be according to the insertion sentence Insert-Select in database, qualified field insertion the One tables of data, for example, a kind of specific implementation that qualified field is inserted to the first tables of data is:Insert into StudentAddress(Address)Select Address From StudentScore。
Step S105, obtain the first storage index.
The first storage index is obtained, wherein, the first storage index is the key assignments according to corresponding to string value in character tandem The corresponding index created.
For example, obtain the key-value pair of value type corresponding with string value in character tandem in processing data table to be compressed The index answered, the AddressKe y keys corresponding to character tandem Address in processing data table to be compressed is StudentScore Value row.AddressKey utilizes the Create Index sentences provided in SQL to establish index Index_AddressK ey.By rope Draw Index_AddressKey as the first storage index, obtain the first storage index, that is, index Index_AddressKey.
By the step, get in character tandem and indexed corresponding to key assignments corresponding to string value, instead of character string Corresponding index in row, therefore when being compressed processing to processing data table to be compressed according to index, improve to be compressed Character tandem is compressed the efficiency of processing in processing data table.
Step S106, processing is compressed to processing data table to be compressed according to the first storage index.
Processing is compressed to processing data table to be compressed according to the first storage index.
For example, according to the first of above-mentioned acquisition storage index for Index_AddressKey to processing data table St to be compressed UdentScore is compressed processing.
Because the first storage index is compressed processing to processing data table to be compressed, the first storage index is according to number It is worth the index that the key assignments of class creates, instead of corresponding index in character tandem, place is compressed to processing data table to be compressed During reason, by making character tandem standardize, using key assignments corresponding to character tandem, i.e. the less value type of space-consuming replaces Change, save space, improve the compression efficiency of row storage.The index created according to the key assignments of value type performs the effect of compression processing Rate performs the efficiency of compression processing apparently higher than according to corresponding index in character tandem, therefore improves to processing number to be compressed The efficiency of processing is compressed according to character tandem in table, reduces the occupancy in space.
Preferably, in order to realize to the transparent of external system, the compression of character string type row provided in an embodiment of the present invention Processing method, after being compressed processing to processing data table to be compressed according to the first storage index, this method also includes:Create Second tables of data, wherein, the second tables of data is used to store in character tandem that string value to be corresponding in string value and character tandem Key assignments tables of data, create the first view, wherein, the first view for connection the first tables of data and the second tables of data view; And according to the first view display data information.
For example, using the external system of StudentScore tables, StudentScore views are created, are linked in view StudentScore and StudentAddress tables, still provide student name Name, student performance Score and student address Tri- row of Address, are realized to the transparent of external system.
Preferably, in order to improve search efficiency, the compression processing method of character string type row provided in an embodiment of the present invention, After the first view display data information, this method also includes:Obtain data to be checked;Query statement is received, wherein, look into It is the instruction for indicating inquiry to ask instruction;And inquiry behaviour is performed in the first view to data to be checked according to query statement Make.
Data to be checked are inquired about in the first view by the program, it is corresponding with character tandem according to character tandem Key assignments between mapping relations, return to Query Result in time, improve search efficiency.
The compression processing method of character string type row provided in an embodiment of the present invention, by determining processing data to be compressed Table;The character tandem in processing data table to be compressed is determined, wherein, it is character string that character string, which is classified as in processing data table to be compressed, The row of type;Key assignments corresponding to string value in character tandem is determined, wherein, key assignments is the value of data type;By character tandem Middle string value replaces with key assignments corresponding with string value in character tandem;The first storage index is obtained, wherein, the first storage Index the corresponding index created for the key assignments according to corresponding to string value in character tandem;And according to the first storage index pair Processing data table to be compressed is compressed processing, solves in the prior art for the row of character string type, compresses treatment effeciency The problem of low, and then the effect of compression treatment effeciency of the lifting to the row of character string type.
Fig. 2 is the flow chart of the compression processing method of character string type row according to a second embodiment of the present invention.Fig. 2 can be with A kind of preferred embodiment as embodiment illustrated in fig. 1.As shown in Fig. 2 this method includes steps S201 to step S208:
Step S201, determine processing data table to be compressed.
The step is with above-mentioned steps S101, and therefore not to repeat here.
Step S202, the character tandem in processing data table to be compressed is determined, wherein, character string is classified as processing number to be compressed According to the row in table being character string type.
The step is with above-mentioned steps S102, and therefore not to repeat here.
Step 203, key assignments corresponding to string value in character tandem is determined, wherein, key assignments is the value of data type.
The step is with above-mentioned steps S103, and therefore not to repeat here.
Step S204, string value in character tandem is replaced with into key assignments corresponding with string value in character tandem.
The step is with above-mentioned steps S104, and therefore not to repeat here.
Step S205, determine the second storage index corresponding to string value in character tandem.
The second storage index corresponding to string value in character tandem is determined, specifically, it is determined that character string in character tandem The second storage index has many modes corresponding to value.
For example, in database, processing data table to be compressed is StudentScore tables, is contained in the StudentScore tables There are tri- row of student name Name, student performance Score and student address Address, wherein, Name and Address are character The row of string type.Row storage index Index_ is created on Address and Name by Create Index sentences in SQL Address and Index_Name.Storage index corresponding to determining on Address and Name for Index_Address and Index_Name。
Step S206, the index according to corresponding to creating key assignments corresponding to string value in character tandem.
The index according to corresponding to creating key assignments corresponding to string value in character tandem.
For example, in database, processing data table to be compressed is StudentScore tables, is contained in the StudentScore tables There are tri- row of student name Name, student performance Score and student address Address, wherein, Name and Address are character The row of string type.AddressKey corresponding to Address character tandems is determined, according to the Create Index provided in SQL Sentence establishes index Index_AddressKey.
Step S207, the index according to corresponding to key assignments corresponding to string value in character tandem replace the second storage index, Obtain the first storage index.
For example, the Index_ that the key assignments AddressKey according to corresponding to string value in character tandem Address is created AddressKey indexes substitute string value in character tandem Address and correspond to Index_Address indexes.
By the step, index corresponding to key assignments corresponding to string value in character tandem is replaced into the second storage and indexed, The first storage index is obtained, makes full use of complimentary nature of the numerical value for row storage index in compression.
Step S208, processing is compressed to processing data table to be compressed according to the first storage index.
The step is with above-mentioned steps S106, and therefore not to repeat here.
The compression processing method of character string type row provided in an embodiment of the present invention, by determining processing data to be compressed Table;The character tandem in processing data table to be compressed is determined, wherein, it is character string that character string, which is classified as in processing data table to be compressed, The row of type;Key assignments corresponding to string value in character tandem is determined, wherein, key assignments is the value of data type;By character tandem Middle string value replaces with key assignments corresponding with string value in character tandem;Determine in character tandem corresponding to string value Two storage indexes;The index according to corresponding to creating key assignments corresponding to string value in character tandem;According to character in character tandem Index corresponding to key assignments corresponding to string value replaces the second storage index, obtains the first storage index;And according to the first storage rope Draw and processing is compressed to processing data table to be compressed, solve in the prior art for the row of character string type, compression processing The problem of efficiency is low, and then the effect of compression treatment effeciency of the lifting to the row of character string type.
It should be noted that can be in such as one group of computer executable instructions the flow of accompanying drawing illustrates the step of Performed in computer system, although also, show logical order in flow charts, in some cases, can be with not The order being same as herein performs shown or described step.
The embodiment of the present invention additionally provides a kind of compression treatment device of character string type row, it is necessary to explanation, this hair Bright embodiment character string type row compression treatment device can be used for perform the embodiment of the present invention provided be used for character The compression processing method of string type row.The compression treatment device of character string type provided in an embodiment of the present invention row is carried out below Introduce.
Fig. 3 is the schematic diagram of the compression treatment device of character string type row according to embodiments of the present invention.As shown in figure 3, The device includes:First determining unit 10, the second determining unit 20, the 3rd determining unit 30, replacement unit 40, first obtain single Member 50 and compression processing unit 60.
First determining unit 10, for determining processing data table to be compressed.
Second determining unit 20, for determining the character tandem in processing data table to be compressed, wherein, character string, which is classified as, to be treated Compress in processing data table for the row of character string type.
3rd determining unit 30, for determining key assignments corresponding to string value in character tandem, wherein, key assignments is data class The value of type.
Replacement unit 40, for string value in character tandem to be replaced with into key corresponding with string value in character tandem Value.
First acquisition unit 50, for obtaining the first storage index, wherein, the first storage index is according in character tandem The corresponding index that key assignments corresponding to string value creates.
Preferably, the first acquisition unit also includes:Determining module, for determining in character tandem corresponding to string value Second storage index;Creation module, for index corresponding to the key assignments establishment according to corresponding to string value in character tandem;And Replacement module, the second storage index is replaced for index corresponding to the key assignments according to corresponding to string value in character tandem, is obtained First storage index.
Compression processing unit 60, for being compressed processing to processing data table to be compressed according to the first storage index.
Preferably, in the compression treatment device of character string type provided in an embodiment of the present invention row, the device also includes: Second acquisition unit, for by string value in character tandem replace with key assignments corresponding with string value in character tandem it Afterwards, the key assignments after replacing is obtained;And generation unit, for generating the first tables of data according to the key assignments after replacement, wherein, first Tables of data is to be stored with the tables of data removed in the key assignments after replacing and processing data table to be compressed outside character tandem.
Preferably, in order to realize to the transparent of external system, in the pressure of character string type provided in an embodiment of the present invention row In contracting processing unit, the device also includes:First creating unit, for creating the second tables of data, wherein, the second tables of data is used for The tables of data of key assignments corresponding to string value in string value and character tandem in character tandem is stored, the second creating unit, is used In creating the first view, wherein, the first view for the first tables of data of connection and the second tables of data view;And display unit, For according to the first view display data information.
Preferably, in order to improve search efficiency, dress is handled in the compression of character string type provided in an embodiment of the present invention row In putting, the device also includes:3rd acquiring unit, for obtaining data to be checked;Receiving unit, for receiving query statement, Wherein, query statement is the instruction for indicating inquiry;And query unit, for according to query statement in the first view it is right Data to be checked perform inquiry operation.
The compression treatment device of character string type row provided in an embodiment of the present invention, determine to treat by the first determining unit 10 Compress processing data table;Second determining unit 20 determines the character tandem in processing data table to be compressed, wherein, character string is classified as It is the row of character string type in processing data table to be compressed;3rd determining unit 30 is determined in character tandem corresponding to string value Key assignments, wherein, key assignments is the value of data type;Replacement unit 40 by string value in character tandem replace with character tandem Key assignments corresponding to string value;First acquisition unit 50 obtains the first storage index, wherein, the first storage index is according to character The corresponding index that key assignments corresponding to string value creates in tandem;Compression processing unit 60 treats pressure according to the first storage index Contracting processing data table is compressed processing, solves low for the row of character string type, compression treatment effeciency in the prior art Problem, and then the effect of compression treatment effeciency of the lifting to the row of character string type.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list Member can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
Obviously, those skilled in the art should be understood that above-mentioned each module of the invention or each step can be with general Computing device realize that they can be concentrated on single computing device, or be distributed in multiple computing devices and formed Network on, alternatively, they can be realized with the program code that computing device can perform, it is thus possible to they are stored Performed in the storage device by computing device, either they are fabricated to respectively each integrated circuit modules or by they In multiple modules or step be fabricated to single integrated circuit module to realize.So, the present invention is not restricted to any specific Hardware and software combines.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies Change, equivalent substitution, improvement etc., should be included in the scope of the protection.

Claims (10)

  1. A kind of 1. compression processing method of character string type row, it is characterised in that including:
    Determine processing data table to be compressed;
    The character tandem in the processing data table to be compressed is determined, wherein, the character string is classified as the processing number to be compressed According to the row in table being character string type;
    Key assignments corresponding to string value in the character tandem is determined, wherein, the key assignments is the value of data type;
    String value in the character tandem is replaced with into key assignments corresponding with string value in the character tandem;
    The first storage index is obtained, wherein, the first storage index is according to corresponding to string value in the character tandem The corresponding index that key assignments creates;And
    Processing is compressed to the processing data table to be compressed according to the described first storage index,
    Wherein, the first storage index, which is used to substitute corresponding to the character tandem, indexes.
  2. 2. according to the method for claim 1, it is characterised in that replaced with and institute by string value in the character tandem State in character tandem after key assignments corresponding to string value, and before the first storage index is obtained, methods described is also Including:
    After string value in the character tandem is replaced with into key assignments corresponding with string value in the character tandem, obtain Take the key assignments after replacing;And
    First tables of data is generated according to the key assignments after the replacement, wherein, first tables of data is to be stored with the key after replacing The tables of data outside character tandem is removed in value and the processing data table to be compressed.
  3. 3. according to the method for claim 2, it is characterised in that
    It is determined that in the character tandem after key assignments corresponding to string value, and by string value in the character tandem Before replacing with key assignments corresponding with string value in the character tandem, methods described also includes:
    The second tables of data is created, wherein, second tables of data is used to store string value and the word in the character tandem The tables of data of key assignments corresponding to string value in tandem is accorded with,
    After processing is compressed to the character tandem according to the described first storage index, methods described also includes:
    The first view is created, wherein, first view is the view for connecting first tables of data and second tables of data; And
    According to the first view display data information.
  4. 4. according to the method for claim 3, it is characterised in that after the first view display data information, institute Stating method also includes:
    Obtain data to be checked;
    Query statement is received, wherein, the query statement is the instruction for indicating inquiry;And
    Inquiry operation is performed to data to be checked in first view according to the query statement.
  5. 5. according to the method for claim 1, it is characterised in that obtaining the first storage index includes:
    Determine the second storage index corresponding to string value in the character tandem;
    The index according to corresponding to creating key assignments corresponding to string value in the character tandem;And
    The index according to corresponding to key assignments corresponding to string value in the character tandem replaces the second storage index, obtains institute State the first storage index.
  6. A kind of 6. compression treatment device of character string type row, it is characterised in that including:
    First determining unit, for determining processing data table to be compressed;
    Second determining unit, for determining the character tandem in the processing data table to be compressed, wherein, the character string is classified as It is the row of character string type in the processing data table to be compressed;
    3rd determining unit, for determining key assignments corresponding to string value in the character tandem, wherein, the key assignments is data The value of type;
    Replacement unit, it is corresponding with string value in the character tandem for string value in the character tandem to be replaced with Key assignments;
    First acquisition unit, for obtaining the first storage index, wherein, the first storage index is according to the character tandem The corresponding index that key assignments corresponding to middle string value creates;And
    Compression processing unit, for being compressed processing to the processing data table to be compressed according to the described first storage index,
    Wherein, the first storage index, which is used to substitute corresponding to the character tandem, indexes.
  7. 7. device according to claim 6, it is characterised in that described device also includes:
    Second acquisition unit, for being replaced with and string value in the character tandem by string value in the character tandem After corresponding key assignments, the key assignments after replacing is obtained;And
    Generation unit, for generating the first tables of data according to the key assignments after the replacement, wherein, first tables of data is storage There is the tables of data outside removing character tandem in key assignments and the processing data table to be compressed after replacing.
  8. 8. device according to claim 7, it is characterised in that described device also includes:
    First creating unit, for creating the second tables of data, wherein, second tables of data is used to store in the character tandem The tables of data of key assignments corresponding to string value in string value and the character tandem,
    Second creating unit, for creating the first view, wherein, first view is connects first tables of data and described The view of second tables of data;And
    Display unit, for according to the first view display data information.
  9. 9. device according to claim 8, it is characterised in that described device also includes:
    3rd acquiring unit, for obtaining data to be checked;
    Receiving unit, for receiving query statement, wherein, the query statement is the instruction for indicating inquiry;And
    Query unit, for performing inquiry operation to data to be checked in first view according to the query statement.
  10. 10. device according to claim 6, it is characterised in that the first acquisition unit includes:
    Determining module, for determining the second storage index corresponding to string value in the character tandem;
    Creation module, for index corresponding to the key assignments establishment according to corresponding to string value in the character tandem;And
    Replacement module, replace described second for index corresponding to the key assignments according to corresponding to string value in the character tandem and deposit Storage index, obtain the first storage index.
CN201410779397.9A 2014-12-15 2014-12-15 The compression processing method and device of character string type row Active CN104408192B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410779397.9A CN104408192B (en) 2014-12-15 2014-12-15 The compression processing method and device of character string type row

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410779397.9A CN104408192B (en) 2014-12-15 2014-12-15 The compression processing method and device of character string type row

Publications (2)

Publication Number Publication Date
CN104408192A CN104408192A (en) 2015-03-11
CN104408192B true CN104408192B (en) 2017-12-19

Family

ID=52645823

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410779397.9A Active CN104408192B (en) 2014-12-15 2014-12-15 The compression processing method and device of character string type row

Country Status (1)

Country Link
CN (1) CN104408192B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815267A (en) * 2015-12-01 2017-06-09 中兴通讯股份有限公司 Date storage method and device
CN105677809B (en) * 2015-12-31 2019-06-28 广州华多网络科技有限公司 A kind of Chinese vocabulary entry index compression method and mobile terminal based on mobile terminal
WO2017161589A1 (en) * 2016-03-25 2017-09-28 华为技术有限公司 Method and apparatus for compression indexing of character string sequences
CN106649859B (en) * 2016-12-30 2019-10-29 中国移动通信集团江苏有限公司 Method and apparatus for being compressed to the file based on character string
CN110069452B (en) * 2019-04-26 2020-04-03 北京字节跳动网络技术有限公司 Data storage method, device and computer readable storage medium
CN110247665A (en) * 2019-05-16 2019-09-17 芜湖智久机器人有限公司 Compression method, device and the computer readable storage medium of JSON data
CN111367920A (en) * 2020-05-28 2020-07-03 成都四方伟业软件股份有限公司 Two-dimensional table-based storage method, index construction method and storage device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5619199A (en) * 1995-05-04 1997-04-08 International Business Machines Corporation Order preserving run length encoding with compression codeword extraction for comparisons
CN101499094A (en) * 2009-03-10 2009-08-05 焦点科技股份有限公司 Data compression storing and retrieving method and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5619199A (en) * 1995-05-04 1997-04-08 International Business Machines Corporation Order preserving run length encoding with compression codeword extraction for comparisons
CN101499094A (en) * 2009-03-10 2009-08-05 焦点科技股份有限公司 Data compression storing and retrieving method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
压缩的列存储数据的查询优化研究与实现;李海燕;《中国优秀硕士学位论文全文数据库 信息科技辑》;20110715(第7期);第2节第1段,第2.1.1节第1段,第2.3节第1段,第2.3节,第4.2节、图2-1,图2-6,图2-7 *

Also Published As

Publication number Publication date
CN104408192A (en) 2015-03-11

Similar Documents

Publication Publication Date Title
CN104408192B (en) The compression processing method and device of character string type row
CN103810224B (en) information persistence and query method and device
CN103514201B (en) Method and device for querying data in non-relational database
US9870382B2 (en) Data encoding and corresponding data structure
CN104408159B (en) A kind of data correlation, loading, querying method and device
CN109918472A (en) Method, apparatus, equipment and the medium of storage and inquiry data
CN107784026A (en) A kind of ETL data processing methods and device
US20170170968A1 (en) Method and apparatus for generating two-dimensional matrix, and method and apparatus for querying key value element
CN110009514B (en) Data extraction method, device, terminal and computer readable storage medium
CN104573022A (en) Data query method and device for HBase
CN101848248B (en) Rule searching method and device
CN108829884A (en) data mapping method and device
CN109902087A (en) For the data processing method and device of question and answer, server
Rachid et al. A practical and scalable tool to find overlaps between sequences
CN106802927A (en) A kind of date storage method and querying method
CN102915344A (en) SQL (structured query language) statement processing method and device
CN110263021B (en) Theme library generation method based on personalized label system
CN105550220A (en) Fetching method and apparatus for heterogeneous system
CN112711649A (en) Database multi-field matching method, device, equipment and storage medium
JP2010521751A (en) Optimal selection of compression entries for compression of program instructions
CN110266834A (en) The regional lookup method and device of internet protocol-based address
CN111078728A (en) Cross-database query method and device in database filing mode
CN106156197A (en) The querying method of a kind of data base and device
CN110019768A (en) Generate the method and device of text snippet
CN110032664A (en) A method of quickly establishing the full node address index of bit coin block chain

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Compression processing method and device of character string type column

Effective date of registration: 20190531

Granted publication date: 20171219

Pledgee: Shenzhen Black Horse World Investment Consulting Co., Ltd.

Pledgor: Beijing Guoshuang Technology Co.,Ltd.

Registration number: 2019990000503

CP02 Change in the address of a patent holder

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Patentee after: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd.

Address before: 100086 Beijing city Haidian District Shuangyushu Area No. 76 Zhichun Road cuigongfandian 8 layer A

Patentee before: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd.