CN102521375B - Directory service data retrieval method and directory service data retrieval system - Google Patents

Directory service data retrieval method and directory service data retrieval system Download PDF

Info

Publication number
CN102521375B
CN102521375B CN201110427701XA CN201110427701A CN102521375B CN 102521375 B CN102521375 B CN 102521375B CN 201110427701X A CN201110427701X A CN 201110427701XA CN 201110427701 A CN201110427701 A CN 201110427701A CN 102521375 B CN102521375 B CN 102521375B
Authority
CN
China
Prior art keywords
directory service
service data
back end
embedded database
tree structure
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
CN201110427701XA
Other languages
Chinese (zh)
Other versions
CN102521375A (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.)
CVIC Software Engineering Co Ltd
Original Assignee
CVIC Software Engineering 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 CVIC Software Engineering Co Ltd filed Critical CVIC Software Engineering Co Ltd
Priority to CN201110427701XA priority Critical patent/CN102521375B/en
Publication of CN102521375A publication Critical patent/CN102521375A/en
Application granted granted Critical
Publication of CN102521375B publication Critical patent/CN102521375B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a directory service data retrieval method, which is applied to a directory server with an embedded database having a data structure which is a balanced binary tree. The method includes: obtaining directory service data, packaging the directory service data into data nodes including directory service data key values, inserting the data nodes into the balanced binary tree structure of the embedded database and storing the data nodes as tree nodes of the balanced binary tree; adjusting the balanced binary tree structure of the embedded database to be balanced; and when a user needs to retrieve the directory service data, receiving a directory service data query request which is sent by the user and includes key matching values of the directory service data to be queried, finding the data nodes corresponding to the key matching values in the balanced binary tree structure of the embedded database of the directory server according to the key matching values, and obtaining the directory service data in the data nodes.

Description

A kind of directory service data retrieval method and system
Technical field
The present invention relates to the Directory Service Technology field, particularly a kind of directory service data retrieval method and system.
Background technology
Growing along with computer network, the particularly development of Internet, resource on network is increasing, for these resources of energy unified management, starts Directory Service Technology for the ground such as various resources, user, equipment, application software on network are managed.Directory service has become a kind of basic platform software on current network, and becomes gradually server.And LDAP (Light Directory Access Protocol, the lightweight access protocal) as a kind of lightweight access protocal of directory information, simple and easy, efficient, customizable directory service is provided, its efficient reading property of data, be widely used in the fields such as authenticating user identification management, digital certificate service.
The storage mode of Current Directory mainly is divided into two kinds: text mode and database mode.
The text storage mode is used LDIF (Light Directory Interchange Format, the lightweight directory Interchange Format) file of standard format carrys out store inventory information, each entry data is packaged into to the LDIF form to be stored in the file with DN (Distinguished Name, difference name) name.Be worth fast filtering but this single storage format is difficult to meet entry attributes, greatly affected query performance.
The storage of database mode mainly adopts three kinds of embedded database, relational database and xml (Extensible Markup Language, extend markup language) databases.Although this storage mode can reduce the system call expense between LIST SERVER and database in the data storage management process.But, along with the data volume that application system is processed is increasing, while especially reaching mass data, the response speed of database access can be greatly affected.
Summary of the invention
Technical matters to be solved by this invention is to provide a kind of directory service data retrieval method, in order to solve in prior art when the LIST SERVER problem that retrieval performance reduces when processing mass data.
For addressing the above problem, the invention discloses a kind of directory service data retrieval method, the method is applied to LIST SERVER, is provided with embedded database in described LIST SERVER, and described embedded database is the binary balance tree structure, and described method comprises:
Obtain the directory service data, by described directory service data encapsulation, it is back end, described back end comprises directory service data key value, and described back end is inserted in described embedded database binary balance tree structure, as a tree node of described binary balance tree, is stored;
Adjust the structure of described embedded database binary balance tree, make it in equilibrium state;
When the user need to be retrieved the directory service data, receive the directory service data query request that the user sends, described data query request comprises the crucial matching value of required query directory service data, search back end corresponding thereto according to described crucial matching value in the binary balance tree structure of the embedded database of described directory service, obtain the directory service data in described back end.
Said method, preferably, the described directory service data of obtaining, be back end by described directory service data encapsulation, and described back end is inserted in described embedded database binary balance tree structure, after being stored as a tree node of described binary balance tree, also comprise:
The pointer information of the adjacent tree node of the tree node at sensing described back end place is deposited in the tree node at described back end place.
Said method, preferably, the back end that the described crucial matching value of described foundation is searched corresponding thereto in the binary balance tree structure of the embedded database of described directory service comprises:
Extract the directory service data index value according to described crucial matching value, according to described directory service data index value or predefined index, go to mate the back end scope that filtering rule filters out the directory service data corresponding with described directory service index value in the binary balance tree structure of the embedded database of described directory service;
The inquiry back end corresponding with described crucial matching value in the back end scope of the directory service data according to described crucial matching value after described filtration.
Said method, preferably, described method also comprises:
The directory service data of having inquired about are stored as directory service data buffer storage object, form directory service data buffer storage object set, described directory service data buffer storage object comprises the buffer memory key value of directory service data.
Said method, preferably, the described crucial matching value of described foundation is searched back end corresponding thereto in the binary balance tree structure of the embedded database of described directory service, and the directory service data of obtaining in described back end comprise:
Inquire about directory service data buffer storage object corresponding thereto according to described crucial matching value in directory service data buffer storage object set, obtain the directory service data;
When not inquiring the directory service data buffer storage object corresponding with described crucial matching value in directory service data buffer storage object set, search back end corresponding thereto according to described crucial matching value in the binary balance tree structure of the embedded database of described directory service, obtain the directory service data in described back end.
Said method, preferably, adjust described embedded database binary balance tree structure, and it is comprised in equilibrium state:
Judge the minimum unbalance subtree of binary balance tree structure of described embedded database;
Adjust minimum unbalance sub-tree structure, make it in equilibrium state.
Said method, preferably, describedly using described directory service data as the directory service cache object, store and comprise:
Described directory service data are stored with the data structure of Hash table as the directory service cache object.
The present invention also provides a kind of directory service data retrieval system, in order to guarantee said method implementation and application in practice, this system applies is in the directory service storehouse, be provided with embedded database in described LIST SERVER, described embedded database is the binary balance tree structure, described system comprises directory service data memory module, balance module and directory service data retrieval module, wherein:
Described directory service data memory module, for obtaining the directory service data, by described directory service data encapsulation, it is back end, described back end comprises directory service data key value, described back end is inserted in described embedded database binary balance tree structure, stored as a tree node of described binary balance tree;
Described balance module, for adjusting the structure of described embedded database binary balance tree, make it in equilibrium state;
Described directory service data retrieval module, for when the user need to be retrieved the directory service data, receive the directory service data query request that the user sends, described data query request comprises the crucial matching value of required query directory service data, search back end corresponding thereto according to described crucial matching value in the binary balance tree structure of the embedded database of described directory service, obtain the directory service data in described back end.
Said system, preferably, described system also comprises that index goes to mate filtering rule setting module and directory service data directory module:
Described index removes to mate the filtering rule setting module, for setting index, removes to mate filtering rule;
Described directory service data directory module, for according to described crucial matching value, extracting the directory service data index value, according to described directory service data index value or predefined index, go to mate the back end scope that filtering rule filters out the directory service data corresponding with described directory service index value in the binary balance tree structure of the embedded database of described directory service, and then according to described crucial matching value the inquiry back end corresponding with described crucial matching value in the back end scope of the directory service data after described filtration.
Said system, preferably, described system also comprises buffer memory center and directory service data buffer storage retrieval module:
Described buffer memory center, stored as directory service data buffer storage object for the directory service data using inquiring;
Described directory service data buffer storage retrieval module, for according to described crucial matching value, at described buffer memory, inquiring about directory service data buffer storage object corresponding thereto in the heart, obtain the directory service data.
In sum, a kind of directory service data retrieval method provided by the invention and system thereof, storage mode based on embedded database, become back end to be stored in the tree node of structure of binary balance tree the directory service data encapsulation, contain the pointer information that points to its next node in each tree node, retrieve in tree-like hierarchical structure, accelerated retrieval rate.Introduce Indexing Mechanism when retrieval, before data retrieval, first search index value, dwindle range of search, accelerated the speed of query directory service data.Introduce in addition caching technology, the directory service data of having inquired about are put into to buffer memory, while not having the directory service data that will inquire about in inquiring about buffer memory, from database, search again, avoided thus consume and the system waste extra time that directly data query brings from database, make the efficiency of search access greatly improve, thereby improved the runnability of application program.
Certainly, arbitrary product of enforcement the application might not need to reach above-described all advantages simultaneously.
The accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present application, in below describing embodiment, the accompanying drawing of required use is briefly described, apparently, accompanying drawing in the following describes is only some embodiment of the application, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The method flow diagram that Fig. 1 is a kind of directory service data retrieval method embodiment mono-provided by the invention;
The data structure diagram of the LIST SERVER that Fig. 2 is a kind of directory service data retrieval method embodiment mono-provided by the invention;
Fig. 3 is that a kind of directory service data retrieval method embodiment bis-provided by the invention introduces the Part Methods process flow diagram of indexing means when data retrieval;
The data structure diagram of the LIST SERVER that Fig. 4 is a kind of directory service data retrieval method embodiment bis-provided by the invention;
Fig. 5 is the introducing caching method Part Methods process flow diagram of a kind of directory service data retrieval method embodiment tri-provided by the invention when data retrieval;
The structural representation that Fig. 6 is a kind of directory service data retrieval system embodiment tetra-provided by the invention;
The structural representation that Fig. 7 is a kind of directory service data retrieval system embodiment five provided by the invention;
The structural representation that Fig. 8 is a kind of directory service data retrieval system embodiment six provided by the invention;
The another kind of structural representation that Fig. 9 is a kind of directory service data retrieval system embodiment six provided by the invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment is only the application's part embodiment, rather than whole embodiment.Embodiment based in the application, those of ordinary skills are not making under the creative work prerequisite the every other embodiment obtained, and all belong to the scope of the application's protection.
Embodiment mono-
Shown in figure 1, for the process flow diagram of a kind of directory service data retrieval method provided by the invention, described method is for LIST SERVER, and described LIST SERVER is provided with embedded database, described embedded database is the binary balance tree structure, and described method comprises:
Step 101: obtain the directory service data, by described directory service data encapsulation, it is back end, described back end comprises directory service data key value, described back end is inserted in described embedded database binary balance tree structure, stored as a tree node of described binary balance tree.
Wherein, in described binary balance tree structure, the tree node node of all likeing father, like son except root node, and its father node at most also comprises a child node except this tree node, for each tree node in described binary balance tree structure arranges a balance factor as the back end of tree node storage, the depth difference that means two subtrees in left and right of described tree node, the left subtree degree of depth by described tree node deducts its right subtree degree of depth.
It should be noted that, after described back end inserts described binary balance tree structure, the pointer information of adjacent node of tree node that points to the back end place of described insertion can also be deposited in the back end at back end place of described insertion, set up direct points relationship thus in each tree node especially tree node in same tree hierarchy, after retrieving in, can accelerate retrieval rate.
Step 102: adjust the structure of described embedded database binary balance tree, make it in equilibrium state.
Wherein, after described back end inserts the binary balance tree structure, its balance factor of father node of described back end place tree node changes, the balance factor of other tree nodes in described binary balance tree structure may change, in the present invention, can realize adjusting the binary balance tree structure by the data structure of building a stack and make it in equilibrium state, process is as follows:
The stacked preservation of the corresponding back end in insertion path when described back end is inserted to described binary balance tree structure;
After insertion completes, preparation is popped the back end in described stack successively, whether the back end that judgement is about to pop is the left sibling of current stack top data node, and if so, the balance factor of stack top data node adds 1, if not, the balance factor of stack top data node subtracts 1, then pops, and in stack, remaining back end is popped successively by above rule, and the back end that finds its balance factor absolute value to be greater than 1, i.e. unbalance point in described binary balance tree structure;
In the unbalance point of finding out, judge minimum subtree unbalance in described binary balance tree structure, and the described unbalance minimum subtree of rotation adjustment, make described binary balance tree structure in equilibrium state.
Step 103: when the user need to be retrieved the directory service data, receive the directory service data query request that the user sends, described data query request comprises the crucial matching value of required query directory service data, search back end corresponding thereto according to described crucial matching value in the binary balance tree structure of the embedded database of described directory service, obtain the directory service data in described back end.
By step 101-step 102, can find out that described LIST SERVER is that a tree is taked hierarchical structure in form on data structure, fast and effectively inquiry can be provided.LIST SERVER data hierarchy figure as shown in Figure 2, the data on it are stored with the binary balance tree structure, with domain name " dc=61s; dc=com " for benchmark, divide level according to ou, cn etc. respectively below it, clear in structure between each layer, Organization of Data information is clear and definite.If search data node " cn=computing machine 3, ou=computing machine, ou=assets ", search procedure is inner as follows:
When we search for the back end of cn=computing machine 3, it is the sequencing of storing in LDAP according to back end, inquired about one by one, first inquire about the back end of cn=computing machine 1, then inquire about the back end of cn=computing machine 2, find again the back end of cn=computing machine 3, return to the directory service data that search after finding.
Above-described embodiment, the storage mode based on embedded database, become back end to be stored in the tree node of structure of binary balance tree the directory service data encapsulation, in tree-like hierarchical structure, retrieves, and accelerated retrieval rate.Thereby improved the runnability of application program.
Embodiment bis-
Shown in figure 3, a kind of directory service data retrieval method embodiment bis-provided for the embodiment of the present invention, for LIST SERVER, described LIST SERVER is provided with embedded database, described database is the binary balance tree structure, the directory service data retrieval method step 101-step 103 provided based on the embodiment of the present invention one, the back end of searching corresponding thereto in the binary balance tree structure of the embedded database of described directory service according to described crucial matching value in described step 103 comprises:
Step 301: according to the described crucial matching value of the directory service data of inquiry that needs, extract the directory service data index value or set index and remove to mate filtering rule.
Wherein, described directory service index value can comprise following several types:
Certain definite value relevant to described directory service data, for example Equality index or Value index, the search form is ' ObjectClasses=person ' or ' attribute=mail ';
The character string relevant to described directory service data, for example SubString index;
Certain definite value or the character string approximate relevant to described directory service data, for example Approximate index or Ordering index.
Step 302: remove to mate filtering rule according to described directory service data index value or index and filter the directory service back end scope corresponding for described directory service index value in the binary balance tree structure of the embedded database of described directory service.
Step 303: inquiry back end corresponding thereto in the back end scope of the directory service data according to described crucial matching value after described filtration.
Wherein, shown in figure 4, be the binary balance tree structural drawing of the embedded database of a certain LIST SERVER, if data query node in figure " cn=c3, ou=ou2, o=dep2 ", during without index, search the back end of cn=c3, it is the sequencing of storing in LDAP according to back end, is searched one by one, first inquire about the back end of cn=c1, then inquire about the back end of cn=c2, the back end at inquiry cn=c3, just find and return to Query Information.When setting up index, need not search for the back end under " o=dep1 ", also need not search the back end under " ou=ou1, o=dep2 ", but the back end under direct search " ou=ou2; o=dep2 ", choosing searches out " cn=c2, ou=ou2; o=dep2 ", then find " cn=c3, ou=ou2, o=dep2 " and return to Search Results.
When the catalog service data, can also preset index and remove to mate filtering rule, the retrieval by window scope, improve retrieval rate fast.
Hence one can see that, the index of reference technology can be accelerated the retrieval rate of directory service data effectively, while especially in LIST SERVER, needing data volume to be processed very large, setting up index and be necessary is also the necessary condition of quick-searching, thereby improves the runnability of application program.
Embodiment tri-
Shown in figure 5, a kind of directory service data retrieval method embodiment provided by the invention tri-process flow diagrams, for LIST SERVER, described LIST SERVER is provided with embedded database, described database is the binary balance tree structure, before end after primary retrieval, the directory service data of having inquired about are stored as directory service data buffer storage object, form directory service data buffer storage object set, described directory service data buffer storage object comprises the key value of directory service data, search method step 101-step 103 based on the embodiment of the present invention one, search back end corresponding thereto according to described crucial matching value in the binary balance tree structure of the embedded database of described directory service described in described step 103, the directory service data of obtaining in described back end comprise:
Step 501: inquire about directory service data buffer storage object corresponding thereto according to the described crucial matching value of directory service data of inquiry that needs in directory service data buffer storage object set, obtain the directory service data.
Wherein, described directory service data buffer storage object is used the data structure of hashtable (Hash table) to be stored, first check that whether cache set is full when the described directory service data buffer storage object of storage, if do not have, so described directory service data buffer storage object adds in described directory service data buffer storage object set smoothly, if described directory service data buffer storage object set is quota, take out so a directory service data buffer storage object in described cache set.
It should be noted that, described method can, by definition Memory Store interface, realize described caching method.
Step 502: when not inquiring the directory service data buffer storage object corresponding with described crucial matching value in directory service data buffer storage object set, search back end corresponding thereto according to described crucial matching value in the binary balance tree structure of the embedded database of described directory service, obtain the directory service data in described back end.
Above-described embodiment, LIST SERVER is when data retrieval, in directory service data buffer storage set now, whether inquiry exists the directory service data buffer storage object corresponding with the crucial matching value of described directory service data, if have, so directly in described directory service data buffer storage object, obtain the directory service data, if no, can continue retrieval according to the search method of two kinds of the embodiment of the present invention one or the embodiment of the present invention so.
By the embodiment of the present invention, when processing the larger data amount, can improve the situation that the LIST SERVER response speed that simultaneously causes because of a plurality of users reduces rapidly when LIST SERVER when a certain data are sent application, improved to a great extent the data retrieval performance.
Embodiment tetra-
Shown in figure 6, the structural representation of a kind of directory service data retrieval system embodiment tetra-provided by the invention, with the search method that realizes that the inventive method embodiment mono-provides, be applied in the directory service storehouse, be provided with embedded database in described LIST SERVER, described embedded database is the binary balance tree structure, and described system comprises directory service data memory module 601, balance module 602 and directory service data retrieval module 603, wherein:
Described directory service data memory module 601, for obtaining the directory service data, by described directory service data encapsulation, it is back end, described back end comprises directory service data key value, described back end is inserted in described embedded database binary balance tree structure, stored as a tree node of described binary balance tree.
Wherein, in described binary balance tree structure, the tree node node of all likeing father, like son except root node, and its father node at most also comprises a child node except this tree node, for each tree node in described binary balance tree structure arranges a balance factor as the back end of tree node storage, the depth difference that means two subtrees in left and right of described tree node, the left subtree degree of depth by described tree node deducts its right subtree degree of depth.
It should be noted that, after described directory service data memory module 601 inserts described binary balance tree structure by described back end, the pointer information of adjacent node of tree node that points to the back end place of described insertion can also be deposited in the back end at back end place of described insertion, set up direct points relationship thus in each tree node especially tree node in same tree hierarchy, after described directory service data retrieval module 603 retrievings in, can accelerate retrieval rate.
Described balance module 602, for adjusting the structure of described embedded database binary balance tree, make it in equilibrium state.
Wherein, after described directory service data memory module 601 inserts the binary balance tree structure by described back end, its balance factor of father node of described back end place tree node changes, the balance factor of other tree nodes in described binary balance tree structure may change, in the present invention, can realize adjusting the binary balance tree structure by the data structure of building a stack and make it in equilibrium state, process is as follows:
The stacked preservation of the corresponding back end in insertion path when described directory service data memory module 601 inserts described binary balance tree structure by described back end;
After insertion completes, preparation is popped the back end in described stack successively, whether the back end that described directory service data memory module 601 judgements are about to pop is the left sibling of current stack top data node, if, the balance factor of stack top data node adds 1, if not, the balance factor of stack top data node subtracts 1, then pop, in stack, remaining back end is popped successively by above rule, and the back end that finds its balance factor absolute value to be greater than 1, i.e. unbalance point in described binary balance tree structure;
In the unbalance point of finding out, described directory service data memory module 601 is judged minimum subtree unbalance in described binary balance tree structure, and the described unbalance minimum subtree of rotation adjustment, makes described binary balance tree structure in equilibrium state.
Described directory service data retrieval module 603, for when the user need to be retrieved the directory service data, receive the directory service data query request that the user sends, described data query request comprises the crucial matching value of required query directory service data, search back end corresponding thereto according to described crucial matching value in the binary balance tree structure of the embedded database of described directory service, obtain the directory service data in described back end.
Directory service data structure with the binary balance tree of embedded database after the storage adjustment of described directory service data memory module 601 and described balance module 602 is stored, with tree structure and adopt hierarchical structure, can provide fast and effeciently inquiry on described LIST SERVER.
Embodiment five
Shown in figure 7, a kind of directory service data retrieval system embodiment five provided by the invention is to realize the method for embodiment bis-provided by the invention, described system comprises that directory service data memory module 601, balance module 602, index go to mate filtering rule setting module 604 and directory service data directory module 605, described directory service data memory module 601, balance module 602 are to similar described in embodiment tri-, wherein:
Described index removes to mate filtering rule setting module 604, for setting index, removes to mate filtering rule;
Described directory service data directory module 605, for according to described crucial matching value, extracting the directory service data index value, go to mate according to described directory service data index value or predefined index the back end scope that filtering rule filters out the directory service data corresponding with described directory service index value in the binary balance tree structure of the embedded database of described directory service, and then according to described crucial matching value the inquiry back end corresponding with described crucial matching value in the back end scope of the directory service data after described filtration, obtain the directory service data in described back end.
Wherein, the directory service data index value that described directory service data directory module 605 is extracted comprises following several types:
Certain definite value relevant to described directory service data, for example Equality index or Value index, the search form is ' ObjectClasses=person ' or ' attribute=mail ';
The character string relevant to described directory service data, for example SubString index;
Certain definite value or the character string approximate relevant to described directory service data, for example Approximate index or Ordering index.
Wherein, shown in figure 4, for the binary balance tree structural drawing of a certain LIST SERVER by the embedded database of directory service data memory module 601 and balance module 602 frameworks, if data query node " cn=c3 in figure, ou=ou2, o=dep2 ", during without index, described directory service data retrieval module 603 is searched the back end of cn=c3, it is the sequencing of storing in LIST SERVER according to back end, searched one by one, first inquire about the back end of cn=c1, then inquire about the back end of cn=c2, back end at inquiry cn=c3, just find and return to Query Information.When setting up index, need not search for the back end under " o=dep1 ", also need not search the back end under " ou=ou1, o=dep2 ", but, by the back end under described directory service data directory module 605 direct searches " ou=ou2; o=dep2 ", choosing searches out " cn=c2, ou=ou2; o=dep2 ", then find " cn=c3, ou=ou2, o=dep2 " and return to Search Results.
When the index list service data, can also remove to mate filtering rule setting module 604 establishment index by described index and remove to mate filtering rule, the retrieval by window scope, improve retrieval rate fast.
Hence one can see that, by directory service data directory module, utilize index technology can effectively accelerate the retrieval rate of directory service data, while especially in LIST SERVER, needing data volume to be processed very large, setting up index and be necessary is also the necessary condition of quick-searching, thereby improves the runnability of application program.
Embodiment six
Shown in figure 8, the structural representation of a kind of directory service searching system embodiment six that the present invention improves, based on the embodiment of the present invention four, to realize the method for embodiment tri-provided by the invention, described system also comprises buffer memory center 606 and directory service data buffer storage retrieval module 607, wherein:
Described buffer memory center 606, stored as directory service data buffer storage object for the directory service data using inquiring;
Described directory service data buffer storage retrieval module 607, for according to described crucial matching value at described buffer memory center directory service data buffer storage objects corresponding thereto of 606 inquiries, obtain the directory service data.
Wherein, described buffer memory center 606 is stored described directory service data buffer storage object with the data structure of hashtable, and the maximum amount of described directory service data buffer storage object is set in described buffer memory center 606, when the directory service data buffer storage number of objects in described buffer memory center 606 reaches its maximum amount, mean full.
It should be noted that, described method can, by definition Memory Store interface in described directory service data buffer storage retrieval module 607, realize described caching method.
Above-described embodiment, before inquiring about described directory service data in described directory service data retrieval module 603 in binary balance tree structure at embedded database by described directory service data buffer storage retrieval module 607, first at described buffer memory center, whether 606 inquiries contain the directory service data buffer storage object corresponding with described crucial matching value, if have, directly in described directory service data buffer storage object, obtain the directory service data, if not, again by described directory service data retrieval module 603 catalog service data in the binary balance tree structure of described embedded database.
Shown in figure 9, while not inquiring the directory service data buffer storage object corresponding with described crucial matching value in described buffer memory center 606, can also remove to mate filtering rule setting module 604 and described directory service data directory module 605 is retrieved the directory service back end corresponding with described crucial matching value in the binary balance tree structure of described embedded database by index, obtain described directory service data.
Pass through the embodiment of the present invention, when LIST SERVER when processing the larger data amount, can improve the situation that the LIST SERVER response speed that simultaneously causes because of a plurality of users reduces rapidly when a certain data are sent application, improve search efficiency, introduce index technology simultaneously, only a step improves retrieval rate, improves to a greater extent the data retrieval performance.
Above a kind of directory service data retrieval method and the system that the application is provided is described in detail, applied specific case herein the application's principle and embodiment are set forth, the explanation of above embodiment is just for helping to understand the application's method and core concept thereof; Simultaneously, for one of ordinary skill in the art, the thought according to the application, all will change in specific embodiments and applications, and in sum, this description should not be construed as the restriction to the application.

Claims (9)

1. a directory service data retrieval method, is characterized in that, the method is applied to LIST SERVER, is provided with embedded database in described LIST SERVER, and described embedded database is the binary balance tree structure, and described method comprises:
Obtain the directory service data, by described directory service data encapsulation, it is back end, described back end comprises directory service data key value, described back end is inserted in described embedded database binary balance tree structure, the tree node as described binary balance tree is stored, and the pointer information of adjacent tree node that will point to the tree node at described back end place is deposited in the tree node at described back end place;
Adjust the structure of described embedded database binary balance tree, make it in equilibrium state;
When the user need to be retrieved the directory service data, receive the directory service data query request that the user sends, described data query request comprises the crucial matching value of required query directory service data, search back end corresponding thereto according to described crucial matching value in the binary balance tree structure of the embedded database of described directory service, obtain the directory service data in described back end.
2. method according to claim 1, is characterized in that, the back end that the described crucial matching value of described foundation is searched corresponding thereto in the binary balance tree structure of the embedded database of described directory service comprises:
Extract the directory service data index value according to described crucial matching value, according to described directory service data index value or predefined index, go to mate the back end scope that filtering rule filters out the directory service data corresponding with described directory service index value in the binary balance tree structure of the embedded database of described directory service;
The inquiry back end corresponding with described crucial matching value in the back end scope of the directory service data according to described crucial matching value after described filtration.
3. method according to claim 1, is characterized in that, described method also comprises:
The directory service data of having inquired about are stored as directory service data buffer storage object, form directory service data buffer storage object set, described directory service data buffer storage object comprises the buffer memory key value of directory service data.
4. method according to claim 3, it is characterized in that, the described crucial matching value of described foundation is searched back end corresponding thereto in the binary balance tree structure of the embedded database of described directory service, and the directory service data of obtaining in described back end comprise:
Inquire about directory service data buffer storage object corresponding thereto according to described crucial matching value in directory service data buffer storage object set, obtain the directory service data;
When not inquiring the directory service data buffer storage object corresponding with described crucial matching value in directory service data buffer storage object set, search back end corresponding thereto according to described crucial matching value in the binary balance tree structure of the embedded database of described directory service, obtain the directory service data in described back end.
5. method according to claim 1, is characterized in that, adjusts described embedded database binary balance tree structure, and it is comprised in equilibrium state:
Judge the minimum unbalance subtree of binary balance tree structure of described embedded database;
Adjust minimum unbalance sub-tree structure, make it in equilibrium state.
6. method according to claim 3, is characterized in that, describedly using described directory service data as the directory service cache object, stores and comprise:
Described directory service data are stored with the data structure of Hash table as the directory service cache object.
7. a directory service data retrieval system, it is characterized in that, be applied in LIST SERVER, be provided with embedded database in described LIST SERVER, described embedded database is the binary balance tree structure, described system comprises directory service data memory module, balance module and directory service data retrieval module, wherein:
Described directory service data memory module, for obtaining the directory service data, by described directory service data encapsulation, it is back end, described back end comprises directory service data key value, described back end is inserted in described embedded database binary balance tree structure, the tree node as described binary balance tree is stored, and the pointer information of adjacent tree node that will point to the tree node at described back end place is deposited in the tree node at described back end place;
Described balance module, for adjusting the structure of described embedded database binary balance tree, make it in equilibrium state;
Described directory service data retrieval module, for when the user need to be retrieved the directory service data, receive the directory service data query request that the user sends, described data query request comprises the crucial matching value of required query directory service data, search back end corresponding thereto according to described crucial matching value in the binary balance tree structure of the embedded database of described directory service, obtain the directory service data in described back end.
8. system according to claim 7, is characterized in that, described system also comprises that index goes to mate filtering rule setting module and directory service data directory module:
Described index removes to mate the filtering rule setting module, for setting index, removes to mate filtering rule;
Described directory service data directory module, for according to described crucial matching value, extracting the directory service data index value, according to described directory service data index value or predefined index, go to mate the back end scope that filtering rule filters out the directory service data corresponding with described directory service index value in the binary balance tree structure of the embedded database of described directory service, and then according to described crucial matching value the inquiry back end corresponding with described crucial matching value in the back end scope of the directory service data after described filtration.
9. system according to claim 7, is characterized in that, described system also comprises buffer memory center and directory service data buffer storage retrieval module:
Described buffer memory center, stored as directory service data buffer storage object for the directory service data using inquiring;
Described directory service data buffer storage retrieval module, for according to described crucial matching value, at described buffer memory, inquiring about directory service data buffer storage object corresponding thereto in the heart, obtain the directory service data.
CN201110427701XA 2011-12-19 2011-12-19 Directory service data retrieval method and directory service data retrieval system Active CN102521375B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110427701XA CN102521375B (en) 2011-12-19 2011-12-19 Directory service data retrieval method and directory service data retrieval system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110427701XA CN102521375B (en) 2011-12-19 2011-12-19 Directory service data retrieval method and directory service data retrieval system

Publications (2)

Publication Number Publication Date
CN102521375A CN102521375A (en) 2012-06-27
CN102521375B true CN102521375B (en) 2013-12-11

Family

ID=46292288

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110427701XA Active CN102521375B (en) 2011-12-19 2011-12-19 Directory service data retrieval method and directory service data retrieval system

Country Status (1)

Country Link
CN (1) CN102521375B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902734A (en) * 2012-09-12 2013-01-30 北京伸得纬科技有限公司 Method and system for catalogue storage and mapping
CN103366014B (en) * 2013-07-30 2017-08-04 汉柏科技有限公司 System for cloud computing data handling system and method based on cluster
CN105426389A (en) * 2015-10-26 2016-03-23 武汉微创光电股份有限公司 Fuzzy retrieval locating method based on UI directory tree view
CN105808745B (en) * 2016-03-11 2019-06-28 中国联合网络通信集团有限公司 A kind of data retrieval method and server
US10783186B2 (en) * 2017-08-31 2020-09-22 Micron Technology, Inc. Heterogenous key-value sets in tree database
CN108924215B (en) * 2018-06-28 2021-03-19 北京顺丰同城科技有限公司 Service discovery processing method and device based on tree structure
CN114491172B (en) * 2022-04-07 2022-08-05 深圳竹云科技股份有限公司 Rapid retrieval method, device and equipment for tree structure nodes and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1635494A (en) * 2003-12-27 2005-07-06 海信集团有限公司 Method for implementing class memory database access and retrieval
US6980985B1 (en) * 2000-08-30 2005-12-27 At&T Corp. Distributed evalulation of directory queries using a topology cache
CN101256579A (en) * 2008-04-08 2008-09-03 中兴通讯股份有限公司 Method for inquesting data organization in database
CN101763415A (en) * 2009-12-16 2010-06-30 北京握奇数据系统有限公司 Method and device for generating B tree index of database

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060026138A1 (en) * 2004-01-09 2006-02-02 Gavin Robertson Real-time indexes
US8312050B2 (en) * 2008-01-16 2012-11-13 International Business Machines Corporation Avoiding database related joins with specialized index structures

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6980985B1 (en) * 2000-08-30 2005-12-27 At&T Corp. Distributed evalulation of directory queries using a topology cache
CN1635494A (en) * 2003-12-27 2005-07-06 海信集团有限公司 Method for implementing class memory database access and retrieval
CN101256579A (en) * 2008-04-08 2008-09-03 中兴通讯股份有限公司 Method for inquesting data organization in database
CN101763415A (en) * 2009-12-16 2010-06-30 北京握奇数据系统有限公司 Method and device for generating B tree index of database

Also Published As

Publication number Publication date
CN102521375A (en) 2012-06-27

Similar Documents

Publication Publication Date Title
CN102521375B (en) Directory service data retrieval method and directory service data retrieval system
US11030243B2 (en) Structure based storage, query, update and transfer of tree-based documents
US6279007B1 (en) Architecture for managing query friendly hierarchical values
US9361346B2 (en) Mapping information stored in a LDAP tree structure to a relational database structure
US6742001B2 (en) System and method for sharing data between hierarchical databases
US6085188A (en) Method of hierarchical LDAP searching with relational tables
US6374253B1 (en) System and method for generating hierarchical forward knowledge
CA2462300C (en) Providing a consistent hierarchical abstraction of relational data
US6625615B2 (en) Data processing system and method for multi-level directory searches
US20060026138A1 (en) Real-time indexes
US9043331B2 (en) System and method for indexing documents on the world-wide web
US6490589B1 (en) System and method for rewriting queries
US20040243576A1 (en) System and method for querying data for implicit hierarchies
US20040172442A1 (en) System and Method for Sharing Data Between Hierarchical Databases
US20070078887A1 (en) Method and System for Creating an Index Arrangement for a Directory
US6865576B1 (en) Efficient schema for storing multi-value attributes in a directory service backing store
US20180089243A1 (en) Bloom filter index for device discovery
KR101224800B1 (en) Crawling database for infomation
KR100999408B1 (en) Method for searching an ??? using hash tree
Ko et al. A binary string approach for updates in dynamic ordered XML data
US20080133587A1 (en) Extending Existing Data within a Directory Service
Vu et al. R*-grove: Balanced spatial partitioning for large-scale datasets
CN108984626A (en) A kind of data processing method, device and server
CN103902554B (en) Data access method and device
US20040122825A1 (en) Method, system, and program product for managing hierarchical structure data items in a database

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