CN104572933B - A kind of method of processing data - Google Patents

A kind of method of processing data Download PDF

Info

Publication number
CN104572933B
CN104572933B CN201410840321.2A CN201410840321A CN104572933B CN 104572933 B CN104572933 B CN 104572933B CN 201410840321 A CN201410840321 A CN 201410840321A CN 104572933 B CN104572933 B CN 104572933B
Authority
CN
China
Prior art keywords
data
retrieved
keyword
dynamic array
record
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
CN201410840321.2A
Other languages
Chinese (zh)
Other versions
CN104572933A (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 Pixel Software Technology Co Ltd
Original Assignee
Beijing Pixel Software 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 Pixel Software Technology Co Ltd filed Critical Beijing Pixel Software Technology Co Ltd
Priority to CN201410840321.2A priority Critical patent/CN104572933B/en
Publication of CN104572933A publication Critical patent/CN104572933A/en
Application granted granted Critical
Publication of CN104572933B publication Critical patent/CN104572933B/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/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing

Abstract

A kind of method of processing data, methods described include:Data element number is included according to wall scroll record, and data columns is set;Record the dynamic array being retrieved and be recorded in corresponding row number in dynamic array where the keyword being retrieved;Record is inserted in the dynamic array of tables of data, position of the corresponding row number in tables of data in dynamic array is recorded according to where keyword, the dynamic array being retrieved and the keyword being retrieved and creates retrieval hash table;According to keyword in hash table is retrieved data element corresponding to quick search.After the embodiment of the present invention, the efficiency for accessing data can be not only improved, while can also ensure to retrieve the efficiency of data.

Description

A kind of method of processing data
Technical field
The application is related to field of computer technology, more particularly, to a kind of method of processing data.
Background technology
During appliance computer, it is often necessary to will be cached in some way using required data.In processing data When, the data someways retrieved in caching are handled, can using caching rapidly and efficiently and the method for retrieving data To ensure quickly exploitation, the execution efficiency of application is improved.
In present computer application, caching and retrieval data are more by the way of linear list, RBTree or hash table.Line Property table be a kind of most basic, most simple and the most frequently used data structure.Relation in linear list between data element is a pair One relation, i.e., in addition to first and last data element, other data elements are all end to end, linear lists All it is to be used in the form of the Special Linear table such as stack, queue, chained list.RBTree is data element with a kind of self-balancing y-bend Search tree mode stores.Hash table is directly to access the data knot in memory storage locations according to keyword (Key value) Structure.Record to access that is, key assignments is mapped into a position in table by the calculating of a function, looked into so as to accelerate Look for speed.This mapping function is referred to as hash function, and the array for depositing record is referred to as hash table.
Data are accessed using prior art and retrieval data function is single, it is impossible to while meet efficient access data and retrieval The demand of data.Such as linear list, the relative position of data element is linear, accesses specified location data age rate height, but According to but needing to travel through whole group data during keyword retrieval data, recall precision is low;For RBTree and hash table, retrieval Efficiency high, but because data element is unordered storage, when accessing data, it is impossible to be quickly found out data element position, efficiency compared with It is low.
The content of the invention
The embodiment of the present invention proposes a kind of method of processing data, can not only improve the efficiency for accessing data, also simultaneously The efficiency of retrieval data can be ensured.
The technical scheme of the embodiment of the present invention is as follows:
A kind of method of processing data, methods described include:
Data element number is included according to wall scroll record, and data columns is set;
Record the dynamic array being retrieved and be recorded in corresponding row number in dynamic array where the keyword being retrieved;
Record is inserted in the dynamic array of tables of data, according to keyword, the dynamic array being retrieved and the pass being retrieved Position of the corresponding row number in tables of data in dynamic array is recorded in where keyword and creates retrieval hash table;
According to keyword in hash table is retrieved data element corresponding to quick search.
The foundation wall scroll record includes data element number and sets data columns to include:
Data columns is equal to wall scroll record and includes data element number.
The data element uses variant type.
The record that inserted in the dynamic array of tables of data includes:
Record is linearly inserted according to data columns in the dynamic array of tables of data.
It is described to be recorded according to where keyword, the dynamic array being retrieved and the keyword being retrieved in dynamic array Position of the corresponding row number in tables of data, which creates retrieval hash table, to be included:
It is recorded according to where keyword, the dynamic array being retrieved and the keyword being retrieved in dynamic array corresponding Linear position of the row number in tables of data create retrieval hash table.
It is described that according to keyword, data element corresponding to quick search includes in hash table is retrieved:
The dynamic array being retrieved is traveled through in hash table is retrieved according to keyword, it is determined that the dynamic array being retrieved is corresponding Row number;
It is recorded in where the keyword for determining to be retrieved in the dynamic array as corresponding to keyword in row number in dynamic array Corresponding row number;
Data element corresponding to corresponding row number quick search is recorded in dynamic array according to where the keyword being retrieved Element.
As can be seen that including data element according to wall scroll record in embodiments of the present invention from above-mentioned technical proposal Number sets data columns;Record the dynamic array being retrieved and be recorded in where the keyword being retrieved in dynamic array corresponding Row number;Record is inserted in the dynamic array of tables of data, according to keyword, the dynamic array being retrieved and the keyword being retrieved Place is recorded in corresponding row number in dynamic array;Position in tables of data creates retrieval hash table;Examined according to keyword Data element corresponding to quick search in rope hash table.Due to being to insert to record in dynamic array, record includes data element in itself Element, it is thus possible to access data rapidly;In addition, the efficiency of retrieval data can be improved by detection hash table.Therefore, not only may be used To improve the efficiency for accessing data, while can also ensure to retrieve the efficiency of data.
Brief description of the drawings
Fig. 1 is the method flow schematic diagram of processing data;
Fig. 2 is employee's tables of data structural representation in embodiment;
Fig. 3 is that employee's tables of data sets columns structural representation in embodiment;
Fig. 4 is employee's structure table index array structure schematic diagram in embodiment;
Fig. 5 is employee's structure table complete structure schematic diagram in embodiment;
Fig. 6 is search routine schematic diagram in embodiment.
Embodiment
It must be more clearly understood to express the object, technical solutions and advantages of the present invention, below in conjunction with the accompanying drawings and specifically The present invention is further described in more detail for embodiment.
In embodiments of the present invention, record is inserted in dynamic array, record includes data element, can visited rapidly in itself Ask data;The efficiency of data is retrieved in structure retrieval hash table to improve.Therefore, the efficiency for accessing data can be not only improved, together When can also ensure retrieve data efficiency.
It is the method flow schematic diagram of processing data referring to accompanying drawing 1, specifically includes following steps:
101st, include data element number according to wall scroll record and data columns is set.
Include at least one data element in wall scroll record, data columns can be equal to wall scroll record and included Data element number.That is several data elements just there are several data to arrange in wall scroll record.
102nd, record the dynamic array being retrieved and be recorded in corresponding row in dynamic array where the keyword being retrieved Number.
Dynamic array is the set that the element of same data type arranges in certain sequence, is exactly that limited individual type is identical Variable with a naming, the set of their variable is then distinguished with numbering, this name is referred to as array name, and numbering claims For subscript, the number of element can dynamically increase in dynamic array.
Correspondingly, dynamic number can be recorded in the pre-recorded dynamic array being retrieved and the keyword being retrieved place Corresponding row number in group.The dynamic array being retrieved can be directly traveled through when so, according to keyword search, so that it is determined that tested Corresponding row number in dynamic array is recorded in where the keyword of rope.
103rd, record is inserted in the dynamic array of tables of data, according to keyword, the dynamic array being retrieved and is retrieved Keyword where be recorded in the position of corresponding row number in dynamic array in tables of data and create retrieval hash table.
Tables of data is formed by multiple dynamic arrays, each dynamic array corresponds to different row numbers, then in each dynamic number Insertion includes the record of data element in group.Insertion record can be inserted to record according to data column line in dynamic array. Linearly inserted with beneficial to the efficiency for improving data element in access record.
Data element is a data in wall scroll record.Data element can use variant type.Variant type is one Kind special data type, can represent the frequently-used data type such as numerical value or character string, when accessing needed for frequently-used data Type carries out automatic identification and conversion.
According to corresponding to being recorded in where keyword, the dynamic array being retrieved and the keyword being retrieved in dynamic array Position of the row number in tables of data creates retrieval hash table.Establishment herein can be that the linear position in tables of data creates inspection Rope hash table.So be advantageous to improve the efficiency of search data element.
104th, according to keyword in hash table is retrieved data element corresponding to quick search.
First, the keyword inputted according to user travels through the dynamic array being retrieved in hash table is retrieved, it is determined that tested Row number corresponding to the dynamic array of rope.Because the ergodic process is not to travel through the data element in all records, but travel through quilt The dynamic array of retrieval, therefore compared with prior art travels through all data elements, can improve and quickly find keyword correspondingly The group number of dynamic array.
Secondly, it is recorded in dynamic number where the keyword for determining to be retrieved in the dynamic array as corresponding to keyword in row number Corresponding row number in group;
And then counted according to being recorded in where the keyword being retrieved in dynamic array corresponding to corresponding row number quick search According to element.
Below in conjunction with the accompanying drawings, technical scheme is described in detail in conjunction with specific embodiments.
201st, data list structure is created.
Include following six referring to the employee's data list structure of accompanying drawing 2:Employee records dynamic array (sky), employee's table columns (sky), employee's table search row number (sky), employee's table columns set device, employee's table search row to set device and employee's table search hash Table.
Wherein, employee's table columns sets device to be used for the columns for setting employee's table.Employee's table search row set device to be used to set Employee's table search arranges.
The 202nd, employee's table columns is set.
It is 4 row that employee's table columns, which sets device to set employee's table columns,:Job number, name, department, age.That is employee's table columns For 4.
The 203rd, employee's table index row are set.
Employee's table search row set device to set employee's table search row, and the dynamic array being retrieved is:Job number, the pass being retrieved It is 1 that corresponding row number in dynamic array is recorded in where keyword;The dynamic array being retrieved is:Name, the keyword being retrieved It is 2 that place, which is recorded in corresponding row number in dynamic array,.
204th, the insertion record employee information in the dynamic array of tables of data, creates retrieval hash table.
Dynamic array has four row, is row number 1 respectively, job number:Row number 2, name;Row number 3, department;Row number 4, age.Due to It is 1 and 2 that corresponding row number in dynamic array is recorded in where the keyword being retrieved, then can be using job number or name as key Word carries out quick search.
205th, keyword retrieval is utilized.
Retrieve employee information of employee's name for a kitten.
Input keyword:Open kitten.According to retrieval hash table, the dynamic array being retrieved is traveled through, it is known that name corresponds to quilt It is 2 that corresponding row number in dynamic array is recorded in where the keyword of retrieval, i.e., the second retrieval row hash table.In the second retrieval row Position of the hash table quick search to the employee information in tables of data is the first row.Obtain the first row employee information:Employee number: 1;Name:Open kitten;Department:Program;Age:23.
Retrieve the employee information that job number is 2.
Input keyword:Job number 2.According to retrieval hash table, the dynamic array being retrieved is traveled through, it is known that job number is corresponding tested It is 1 that corresponding row number in dynamic array is recorded in where the keyword of rope, i.e., the first retrieval row hash table.Dissipated in the first retrieval row Position of the list quick search to the employee information in tables of data is the second row.Obtain the second row employee information:Employee number:2; Name:The big cat of Lee;Department:The fine arts;Age:24.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the scope of the present invention.It is all Within the spirit and principles in the present invention, any modification, equivalent substitution and improvements made etc., the protection of the present invention should be included in Within the scope of.

Claims (5)

  1. A kind of 1. method of processing data, it is characterised in that methods described includes:
    Data element number is included according to wall scroll record, and data columns is set;
    Record the dynamic array being retrieved and be recorded in corresponding row number in dynamic array where the keyword being retrieved;
    Record is inserted in the dynamic array of tables of data, according to keyword, the dynamic array being retrieved and the keyword being retrieved Place is recorded in position of the corresponding row number in tables of data in dynamic array and creates retrieval hash table;
    According to keyword in hash table is retrieved data element corresponding to quick search;
    It is described that according to keyword, data element corresponding to quick search includes in hash table is retrieved:
    The dynamic array being retrieved is traveled through in hash table is retrieved according to keyword, it is determined that being arranged corresponding to the dynamic array being retrieved Number;
    It is recorded in where the keyword for determining to be retrieved in the dynamic array as corresponding to keyword in row number in dynamic array corresponding Row number;
    Data element corresponding to corresponding row number quick search is recorded in dynamic array according to where the keyword being retrieved.
  2. 2. the method for processing data according to claim 1, it is characterised in that described to include data element according to wall scroll record Plain number sets data columns to include:
    Data columns is equal to wall scroll record and includes data element number.
  3. 3. the method for processing data according to claim 1, it is characterised in that the data element uses variant type.
  4. 4. the method for processing data according to claim 1, it is characterised in that described to be inserted in the dynamic array of tables of data Record includes:
    Record is linearly inserted according to data columns in the dynamic array of tables of data.
  5. 5. the method for processing data according to claim 1, it is characterised in that described according to keyword, the dynamic being retrieved Position of the corresponding row number in tables of data in dynamic array is recorded in where array and the keyword being retrieved and creates to retrieve and is dissipated List includes:
    Corresponding row in dynamic array are recorded according to where keyword, the dynamic array being retrieved and the keyword being retrieved Linear position number in tables of data creates retrieval hash table.
CN201410840321.2A 2014-12-30 2014-12-30 A kind of method of processing data Active CN104572933B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410840321.2A CN104572933B (en) 2014-12-30 2014-12-30 A kind of method of processing data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410840321.2A CN104572933B (en) 2014-12-30 2014-12-30 A kind of method of processing data

Publications (2)

Publication Number Publication Date
CN104572933A CN104572933A (en) 2015-04-29
CN104572933B true CN104572933B (en) 2018-02-23

Family

ID=53088995

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410840321.2A Active CN104572933B (en) 2014-12-30 2014-12-30 A kind of method of processing data

Country Status (1)

Country Link
CN (1) CN104572933B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113903410B (en) * 2021-12-08 2022-03-11 成都健数科技有限公司 Compound retrieval method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1952932A (en) * 2006-09-06 2007-04-25 南京中兴软创科技有限责任公司 A storage and search method of multiple index hash table
CN101751406A (en) * 2008-12-18 2010-06-23 赵伟 Method and device for realizing column storage based relational database
CN102663116A (en) * 2012-04-11 2012-09-12 中国人民大学 Multi-dimensional OLAP (On Line Analytical Processing) inquiry processing method facing column storage data warehouse
CN102890721A (en) * 2012-10-16 2013-01-23 苏州迈科网络安全技术股份有限公司 Database establishment method and database establishment system based on column storage technology
CN103678556A (en) * 2013-12-06 2014-03-26 华为技术有限公司 Method for processing column-oriented database and processing equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7028147B2 (en) * 2002-12-13 2006-04-11 Sun Microsystems, Inc. System and method for efficiently and reliably performing write cache mirroring

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1952932A (en) * 2006-09-06 2007-04-25 南京中兴软创科技有限责任公司 A storage and search method of multiple index hash table
CN101751406A (en) * 2008-12-18 2010-06-23 赵伟 Method and device for realizing column storage based relational database
CN102663116A (en) * 2012-04-11 2012-09-12 中国人民大学 Multi-dimensional OLAP (On Line Analytical Processing) inquiry processing method facing column storage data warehouse
CN102890721A (en) * 2012-10-16 2013-01-23 苏州迈科网络安全技术股份有限公司 Database establishment method and database establishment system based on column storage technology
CN103678556A (en) * 2013-12-06 2014-03-26 华为技术有限公司 Method for processing column-oriented database and processing equipment

Also Published As

Publication number Publication date
CN104572933A (en) 2015-04-29

Similar Documents

Publication Publication Date Title
JP6362316B2 (en) Method, system and computer program product for hybrid table implementation using buffer pool as resident in-memory storage for memory resident data
US11620397B2 (en) Methods and apparatus to provide group-based row-level security for big data platforms
US9576006B2 (en) Method and system for storing data in a database
CN104679778B (en) A kind of generation method and device of search result
KR100946055B1 (en) Heterogeneous indexing for annotation systems
US8626781B2 (en) Priority hash index
US8099440B2 (en) Method for laying out fields in a database in a hybrid of row-wise and column-wise ordering
WO2018064962A1 (en) Data storage method, electronic device and computer non-volatile storage medium
CN102930060B (en) A kind of method of database quick indexing and device
CN107491487A (en) A kind of full-text database framework and bitmap index establishment, data query method, server and medium
US9292554B2 (en) Thin database indexing
US20100274795A1 (en) Method and system for implementing a composite database
JP2012526320A5 (en)
US11288287B2 (en) Methods and apparatus to partition a database
CN104572933B (en) A kind of method of processing data
CN107783732A (en) A kind of data read-write method, system, equipment and computer-readable storage medium
CN104301182B (en) A kind of querying method and device of the exception information of website visiting at a slow speed
CN107704478A (en) A kind of method and system for writing daily record
US9292553B2 (en) Queries for thin database indexing
US7870138B2 (en) File storage and retrieval method
CN101916275A (en) Method and system for accessing log data of multiple data sources
JP7116382B2 (en) Method, computer program and apparatus utilizing open address probe barrier
Chang et al. Implementation of secondary index on cloud computing NoSQL database in big data environment
Byun et al. Asymmetric index management scheme for high-capacity compressed databases
Ragavan Efficient key hash indexing scheme with page rank for category based search engine big data

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