CN100428226C - Method for implementing class memory database access and retrieval - Google Patents

Method for implementing class memory database access and retrieval Download PDF

Info

Publication number
CN100428226C
CN100428226C CNB2003101145692A CN200310114569A CN100428226C CN 100428226 C CN100428226 C CN 100428226C CN B2003101145692 A CNB2003101145692 A CN B2003101145692A CN 200310114569 A CN200310114569 A CN 200310114569A CN 100428226 C CN100428226 C CN 100428226C
Authority
CN
China
Prior art keywords
list
data
storage
concordance list
access
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.)
Expired - Lifetime
Application number
CNB2003101145692A
Other languages
Chinese (zh)
Other versions
CN1635494A (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.)
Hisense Group Co Ltd
Original Assignee
Hisense Group 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 Hisense Group Co Ltd filed Critical Hisense Group Co Ltd
Priority to CNB2003101145692A priority Critical patent/CN100428226C/en
Publication of CN1635494A publication Critical patent/CN1635494A/en
Application granted granted Critical
Publication of CN100428226C publication Critical patent/CN100428226C/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Abstract

The present invention relates to a method for implementing access and a search method of a class memory database, which is applied to an embedded system. In the method, a storage table for corresponding data nodes is established according to the requirement of data search, and a corresponding index table is established according to the storage table, and is a dynamic data and sorted table structure which is established based on a model of a balanced binary tree. Sorted fields of the established index table is superior to the storage table, and the several times of inquiry which is appointed firstly is scanned and analyzed. The priority levels of attribute inquiry is sorted to determine a sorted rule of an index, and consequently, the efficiency of data inquiry is higher. Compared with a search method for the existing memory database, the access and search methods has the advantages of immediately updating the hit ratio of statistical inquiry, high database management, high safety performance, improving efficiency and reducing the occupation of memory and outer memory resources.

Description

Realize the method for class internal storage data library access and retrieval
Technical field
The present invention relates to the method for a kind of access and retrieval, be implemented in low-resource at the class memory database specifically and take data quick access and retrieval under the prerequisite.
Background technology
Along with the fast development of the present computing machine and the network information technology, more and more be unable to do without use in existing office and the life for computing machine and network.Various a large amount of information and data have realized data sharing and remote transmission by network or unit operation.When the data in the database are managed, at the effective classified access of data and implement the method for advanced search and software also correspondingly produces and is applied.
The data managing method that obtains more application at present includes modes such as level, netted and relational database, though can solve the problem of data access and retrieval to a certain extent, sets up and uses this class commercial data base and still exist certain defective.Such as, database foundation and use cost are higher, just seem too expensive for small-sized data management unit; In addition, existing all being based at hard disk or tape as databases such as MS SQL, DBII and Oracle operated, and can't satisfy the requirement of real-time response, quick access and retrieval when data volume is big.Now also there is the memory database of employing to set up the pattern of data access and retrieval,, also taken bigger external memory and memory source space, particularly serious waste of resources for embedded system simultaneously though retrieval rate is very fast.
As mentioned above, existing various database accesss and search method all exist significant disadvantages and deficiency for small-sized data application units, in the public technology corresponding solution is not arranged now.
Summary of the invention
The method of realization class internal storage data library access of the present invention and retrieval is intended to address the above problem and not enough and design has data access and the search method that is applied to embedded system data base.
For solving the problems of the technologies described above, the present invention is achieved by the following technical solutions:
A kind of method that realizes library access of class internal storage data and retrieval, it comprises the steps: class memory database initialization step and class internal storage data library searching and access step, wherein, described class memory database initialization step and then comprise the steps:
Read the up-to-date m of configuration and hit counting rate meter, m is the total degree of the inquiry of required execution in the one query hit rate computation period, and following m explains identical;
Set up the back end storage list of showing type structure based on Hash at data content and type;
Foundation is based on the concordance list of balanced binary tree-model, and the preferential storage list of concordance list sort field;
Call the storage function in class internal storage data library searching and the access step, set up all forms in the database, according to the preferential storage list of concordance list sort field described concordance list is sorted simultaneously;
Described class internal storage data library searching and access step and then may further comprise the steps:
Need to analyze m bar query note, hit the counting rate meter from m, select hit rate the highest be next time m value, all identical as if hit rate, then selection at random;
After receiving query statement, at first total inquiry times is added 1 at every turn, determines the field total quantity that relates to then, again according to existing priority data from big to small respectively with the memory range of this weight allocation to the preferential storage list of this concordance list sort field; In i<=m, i is the total inquiry times that comprises in the query hit rate computation period after this inquiry, and the value of i is in the natural number scope, and simply priority data and the summation of this weight with last time can obtain this priority data; Emptying the preferential storage list data of concordance list sort field and put i when i>m is 0;
Carry out the concordance list ordering according to optimum field, then skip this step identical with the last time, and the value place in the preferential storage list of concordance list sort field adds 1; Then according to the back end key word that whether has optimum field to decide in the querying condition how to obtain needs, if having, then from based on the back end key word that need to obtain the concordance list of balanced binary tree-model; If do not have, then from back end storage list, obtain the back end key word of needs based on Hash table type structure, finally carrying out unirecord one by one reads, there are not all data that Keyword List can only ergodic data node storage list, when carrying out the unirecord access, as long as directly storage back end storage list can guarantee can obtain accurate location after the function conversion of limited number of time, and not need to check one by one;
Carrying out hit rate when total inquiry times is more than or equal to m calculates, inserting the relevant position then and putting total inquiry times is 0, therefrom select the highest conduct of hit rate m value next time then, if hitting to have in the counting rate meter more than a position, m is maximum, then conduct of random choose m value next time simultaneously;
Rebulid concordance list based on the balanced binary tree-model;
Empty the preferential storage list of concordance list sort field;
When stopping to serve, with m hit counting rate meter as configuration file stores to external memory, as the initial value of service operation next time.
Described back end storage list by major key can the one-time positioning data the memory location.
As mentioned above, the method for realization class internal storage data library access of the present invention and retrieval, the storage of data is that the third normal form according to relational database carries out, and can effectively prevent redundant and unusual.And compare with existing memory database search method, can immediate updating statistical query hit rate, have quite high data base administration and security performance, therefore can raise the efficiency and reduce the memory, external memory resource occupation.
Description of drawings
Fig. 1 is described back end storage list;
Fig. 2 is the described balanced binary tree illustraton of model of setting up concordance list;
Fig. 3 is the preferential storage list of described sort field;
Fig. 4 is the up-to-date counting rate meter that hits behind some records of retrieval;
Fig. 5 is the initialization flowchart of class memory database;
Fig. 6 is the ending phase synoptic diagram of class memory database;
Fig. 7 is described configuration file format table;
Fig. 8 is described class internal storage data library inquiry and access process flow diagram.
Embodiment
As Fig. 1-shown in Figure 8, the method for realization class internal storage data library access of the present invention and retrieval is set up the storage list of corresponding data node at data content and type, to realize according to major key direct access target data.Set up corresponding concordance list according to storage list based on the balanced binary tree-model.Set up a preferential storage list of concordance list sort field according to above-mentioned concordance list, scan and analyze, the priority of attribute query is sorted, determine the ordering rule of index specifying several times inquiry formerly.
As shown in Figure 1, described storage list is based on that Hash table type structure sets up, by major key (boldface type) can the one-time positioning data the memory location, thereby use major key just can realize the fast data access.
According to data content in the described storage list and type, for effectively avoiding the whole redundancy and unusual that occurs of database, normally press the third normal form pattern in the relational database, set up the question blank that is used for fast query and data locking accordingly.
As shown in Figure 2, set up the balanced binary tree-model of concordance list, realize that the major key of each node manipulative indexing table is stored, and carried out optimum field ordering in advance according to above-mentioned storage list.Thereby the inquiry complexity minimum can guarantee that index hits the time.
As shown in Figure 3, comprise the priority data of storage list all properties in the preferential storage list of concordance list sort field, last column data in table be its above column the m line data and.
As shown in Figure 4, behind the m bar query note in analyzing the preferential storage list of above-mentioned concordance list sort field, hitting in the counting rate meter shown in up-to-date hit rate deposited in.
As shown in Figure 5, the initialization flow process of described class memory database is:
Read the up-to-date m of configuration and hit counting rate meter (as Fig. 4);
Set up described concordance list and balance Two Binomial Tree Model (as Fig. 2) and the preferential storage list of concordance list sort field (as Fig. 3);
Call the storage function in described class internal storage data library inquiry and the access flow process (as Fig. 8), set up all forms (as Fig. 1) in the database, further improve described concordance list (as Fig. 2) simultaneously.
As shown in Figure 6, be described class memory database ending phase synoptic diagram.
As shown in Figure 7, be described configuration file format table.
As shown in Figure 8, described class internal storage data library inquiry and access flow process are:
Need to analyze m bar query note, from above-mentioned Fig. 4, select hit rate the highest be next time m value, all identical as if hit rate, then selection at random;
After receiving query statement, at first total inquiry times is added 1, determining to relate to Field Count then is the N0. value, then respectively this weight (N0...1) is assigned to this memory range from big to small according to existing priority data at every turn; In i<=m, simply priority data and the summation of this weight with last time can obtain this priority data; Emptying this table data and put i when i>m is 0.
Carry out the concordance list ordering according to optimum field, then skip this step identical with the last time, and the value place in the preferential storage list of sort field as shown in Figure 3 adds 1; Screen first according to optimum field (if any) then, thereby the final back end key word that needs of obtaining finally carries out unirecord one by one and reads (do not have Keyword List can only traversal list all data).When carrying out the unirecord access, need only the storage list of directly looking into as shown in Figure 1, can guarantee after the function conversion of limited number of time, can obtain accurate location, and not need to check one by one;
Carrying out hit rate when total inquiry times is more than or equal to m calculates, inserting the relevant position then and putting total inquiry times is 0, therefrom select the highest the carrying out of hit rate m value (being maximum, then conduct of random choose m value next time simultaneously) next time then if hit to have in the counting rate meter more than a position;
Rebulid storage list concordance list as shown in Figure 2;
Empty the preferential storage list of concordance list sort field as shown in Figure 3;
When stopping to serve, will hit counting rate meter and store external memory into, as the initial value of service operation next time as configuration file (as Fig. 4).

Claims (2)

1, a kind of method that realizes library access of class internal storage data and retrieval, it comprises the steps: class memory database initialization step and class internal storage data library searching and access step, wherein, described class memory database initialization step and then comprise the steps:
Read the up-to-date m of configuration and hit counting rate meter, m is the total degree of the inquiry of required execution in the one query hit rate computation period, and following m explains identical;
Set up the back end storage list of showing type structure based on Hash at data content and type;
Foundation is based on the concordance list of balanced binary tree-model, and the preferential storage list of concordance list sort field;
Call the storage function in class internal storage data library searching and the access step, set up all forms in the database, according to the preferential storage list of concordance list sort field described concordance list is sorted simultaneously;
Described class internal storage data library searching and access step and then comprise step:
Need to analyze m bar query note, hit the counting rate meter from m, select hit rate the highest be next time m value, all identical as if hit rate, then selection at random;
After receiving query statement, at first total inquiry times is added 1 at every turn, determines the field total quantity that relates to then, again according to existing priority data from big to small respectively with the memory range of this weight allocation to the preferential storage list of this concordance list sort field; In i<=m, i is the total inquiry times that comprises in the query hit rate computation period after this inquiry, and the value of i is in the natural number scope, and simply priority data and the summation of this weight with last time can obtain this priority data; Emptying the preferential storage list data of concordance list sort field and put i when i>m is 0;
Carry out the concordance list ordering according to optimum field, then skip this step identical with the last time, and the value place in the preferential storage list of concordance list sort field adds 1; Then according to the back end key word that whether has optimum field to decide in the querying condition how to obtain needs, if having, then from based on the back end key word that need to obtain the concordance list of balanced binary tree-model; If do not have, then from back end storage list, obtain the back end key word of needs based on Hash table type structure, finally carrying out unirecord one by one reads, there are not all data that Keyword List can only ergodic data node storage list, when carrying out the unirecord access, as long as directly storage back end storage list can guarantee can obtain accurate location after the function conversion of limited number of time, and not need to check one by one;
Carrying out hit rate when total inquiry times is more than or equal to m calculates, inserting then that m hits in the counting rate meter relevant position and put total inquiry times is 0, hit from m then and select the highest conduct of hit rate m value next time the counting rate meter, if hitting to have in the counting rate meter more than a position, m is maximum, then conduct of random choose m value next time simultaneously;
Rebulid concordance list based on the balanced binary tree-model;
Empty the preferential storage list of concordance list sort field;
When stopping to serve, with m hit counting rate meter as configuration file stores to external memory, as the initial value of service operation next time.
2, the method for realization class internal storage data library access according to claim 1 and retrieval is characterized in that: described back end storage list by major key can the one-time positioning data the memory location.
CNB2003101145692A 2003-12-27 2003-12-27 Method for implementing class memory database access and retrieval Expired - Lifetime CN100428226C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2003101145692A CN100428226C (en) 2003-12-27 2003-12-27 Method for implementing class memory database access and retrieval

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2003101145692A CN100428226C (en) 2003-12-27 2003-12-27 Method for implementing class memory database access and retrieval

Publications (2)

Publication Number Publication Date
CN1635494A CN1635494A (en) 2005-07-06
CN100428226C true CN100428226C (en) 2008-10-22

Family

ID=34843456

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2003101145692A Expired - Lifetime CN100428226C (en) 2003-12-27 2003-12-27 Method for implementing class memory database access and retrieval

Country Status (1)

Country Link
CN (1) CN100428226C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102467692A (en) * 2010-11-16 2012-05-23 金蝶软件(中国)有限公司 DuPont analysis presentation method and device

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100426253C (en) * 2005-08-01 2008-10-15 中兴通讯股份有限公司 Test method of a database depended software unit
CN100371936C (en) * 2006-04-03 2008-02-27 无锡永中科技有限公司 Data search method for tree-type structural file
US7860823B2 (en) * 2006-05-04 2010-12-28 Microsoft Corporation Generic interface for deep embedding of expression trees in programming languages
CN101452422B (en) * 2007-11-29 2011-03-30 联芯科技有限公司 Chip data read-write method, corresponding apparatus and system
CN101388842B (en) * 2008-10-30 2012-04-04 华为技术有限公司 Storage method and apparatus
CN101572762B (en) * 2009-02-25 2012-07-04 南京联创科技集团股份有限公司 Method for realizing combination of mass tickets by statistic based storage management and quick indexing
CN102521375B (en) * 2011-12-19 2013-12-11 山东中创软件商用中间件股份有限公司 Directory service data retrieval method and directory service data retrieval system
CN103177026A (en) * 2011-12-23 2013-06-26 北京新媒传信科技有限公司 Data management method and data management system
CN103425694B (en) * 2012-05-23 2016-12-14 北京神州泰岳软件股份有限公司 The searching method of relational data and device
US8510261B1 (en) * 2012-05-29 2013-08-13 Sap Ag System and method of generating in-memory models from data warehouse models
US8930374B2 (en) * 2012-06-29 2015-01-06 Nokia Corporation Method and apparatus for multidimensional data storage and file system with a dynamic ordered tree structure
CN103678384A (en) * 2012-09-18 2014-03-26 鸿富锦精密工业(深圳)有限公司 Sequential index generating system and sequential index generating method
CN102945163A (en) * 2012-10-29 2013-02-27 桂林电子科技大学 Signal-slot structure for embedded system
CN103455556B (en) * 2013-08-08 2017-06-23 成都市欧冠信息技术有限责任公司 Memory cell data method of cutting out
CN104679816B (en) * 2014-12-17 2018-02-06 上海彩亿信息技术有限公司 A kind of SQLITE database application methods under embedded system
CN107239454B (en) * 2016-03-28 2020-11-17 福建天晴数码有限公司 Retrieval method and system based on text database
CN108416000A (en) * 2018-02-27 2018-08-17 百度在线网络技术(北京)有限公司 Method for exhibiting data, device, equipment and storage medium
CN111046034B (en) * 2018-10-12 2024-02-13 第四范式(北京)技术有限公司 Method and system for managing memory data and maintaining data in memory

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0547992A2 (en) * 1991-12-17 1993-06-23 International Business Machines Corporation Method and system for enhanced efficiency of data recovery in balanced tree memory structures
US6292795B1 (en) * 1998-05-30 2001-09-18 International Business Machines Corporation Indexed file system and a method and a mechanism for accessing data records from such a system
US20020181480A1 (en) * 2001-01-22 2002-12-05 Ian Puleston Method for using a balanced tree as a base for a routing table

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0547992A2 (en) * 1991-12-17 1993-06-23 International Business Machines Corporation Method and system for enhanced efficiency of data recovery in balanced tree memory structures
US6292795B1 (en) * 1998-05-30 2001-09-18 International Business Machines Corporation Indexed file system and a method and a mechanism for accessing data records from such a system
US20020181480A1 (en) * 2001-01-22 2002-12-05 Ian Puleston Method for using a balanced tree as a base for a routing table

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102467692A (en) * 2010-11-16 2012-05-23 金蝶软件(中国)有限公司 DuPont analysis presentation method and device

Also Published As

Publication number Publication date
CN1635494A (en) 2005-07-06

Similar Documents

Publication Publication Date Title
CN100428226C (en) Method for implementing class memory database access and retrieval
CN108874971B (en) Tool and method applied to mass tagged entity data storage
US9195699B2 (en) Method and apparatus for storage and retrieval of information in compressed cubes
RU2400803C2 (en) Long-term storage of types and copies of net data
TWI662426B (en) Method and device for distributed stream data processing
US11636083B2 (en) Data processing method and apparatus, storage medium and electronic device
US6681218B1 (en) System for managing RDBM fragmentations
US8688682B2 (en) Query expression evaluation using sample based projected selectivity
US20040133581A1 (en) Database management system, data structure generating method for database management system, and storage medium therefor
US11321315B2 (en) Methods and systems for database optimization
CN101681354A (en) Transporting table valued parameter over tabular data stream protocol
CN102362273A (en) Dynamic hash table for efficient data access in relational database system
KR20060103828A (en) Mapping of a file system model to a database object
US20140214838A1 (en) Method and system for processing large amounts of data
CN106326387A (en) Distributive data storage architecture, data storage method and data inquiry method
CN114116716A (en) Hierarchical data retrieval method, device and equipment
CN111666344A (en) Heterogeneous data synchronization method and device
US20080294673A1 (en) Data transfer and storage based on meta-data
US7440936B2 (en) Method for determining an access mode to a dataset
US7139690B2 (en) Object-level conflict detection in an object-relational database system
CN101295312B (en) Method for presenting data by table
US8290935B1 (en) Method and system for optimizing database system queries
CN102597969A (en) Database management device using key-value store with attributes, and key-value-store structure caching-device therefor
Ross et al. Serving datacube tuples from main memory
CN112667859A (en) Data processing method and device based on memory

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CX01 Expiry of patent term
CX01 Expiry of patent term

Granted publication date: 20081022