CN102521375A - 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
CN102521375A
CN102521375A CN201110427701XA CN201110427701A CN102521375A CN 102521375 A CN102521375 A CN 102521375A CN 201110427701X A CN201110427701X A CN 201110427701XA CN 201110427701 A CN201110427701 A CN 201110427701A CN 102521375 A CN102521375 A CN 102521375A
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.)
Granted
Application number
CN201110427701XA
Other languages
Chinese (zh)
Other versions
CN102521375B (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

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 the network is increasing, and for these resources of ability unified management, beginning is used for Directory Service Technology ground such as various resources, user, equipment, application software on the network are managed.Directory service has become a kind of basic platform software on the current network, and becomes server gradually.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; It is reading property of data efficiently, is widely used in 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 DIF) file of standard format comes store inventory information; Each entry data is packaged into the LDIF format in the file with DN (Distinguished Name, difference name) name.Be worth filtering fast but this single storage format is difficult to satisfy entry attributes, greatly influenced query performance.
Three kinds of embedded database, relational database and xml (Extensible Markup Language, extend markup language) databases are mainly adopted in the storage of database mode.Though this storage mode can reduce the system call expense between the LIST SERVER and database in the data storage management process.But along with the data volume that application system is handled is increasing, when especially reaching mass data, the response speed of database access can receive very big influence.
Summary of the invention
Technical matters to be solved by this invention provides a kind of directory service data retrieval method, in order to solve in the prior art when the LIST SERVER problem that retrieval performance reduces when handling mass data.
For addressing the above problem, the invention discloses a kind of directory service data retrieval method, this method is applied to LIST SERVER, is provided with embedded database in the said LIST SERVER, and said embedded database is a y-bend balanced tree structure, and said method comprises:
Obtain the directory service data; With said directory service data encapsulation is back end; Said back end comprises directory service data key value, and said back end is inserted in the said embedded database y-bend balanced tree structure, stores as a tree node of said y-bend balanced tree;
Adjust the structure of said embedded database y-bend balanced tree, make it be in equilibrium state;
When the user need retrieve the directory service data; Receive the directory service data query request that the user sends; Said data query request comprises the crucial matching value of required query directory service data; In the y-bend balanced tree structure of the embedded database of said directory service, search back end corresponding according to said crucial matching value, obtain the directory service data in the said back end with it.
Said method; Preferably, the said directory service data of obtaining are back end with said directory service data encapsulation; And said back end inserted in the said embedded database y-bend balanced tree structure, also comprise after storing as a tree node of said y-bend balanced tree:
The pointer information of the adjacent tree node of the tree node that points to said back end place is deposited in the tree node at said back end place.
Said method, preferably, the said crucial matching value of said foundation is searched back end corresponding with it and is comprised in the y-bend balanced tree structure of the embedded database of said directory service:
Extract the directory service data index value according to said crucial matching value, go the match filtering rule in the y-bend balanced tree structure of the embedded database of said directory service, to filter out the back end scope with the corresponding directory service data of said directory service index value according to said directory service data index value or predefined index;
According to inquiry and the corresponding back end of said crucial matching value in the back end scope of the directory service data of said crucial matching value after said filtration.
Said method, preferably, said method also comprises:
The directory service data of having inquired about are stored as directory service metadata cache object, form directory service metadata cache object set, said directory service metadata cache object comprises the buffer memory key value of directory service data.
Said method, preferably, the said crucial matching value of said foundation is searched back end corresponding with it in the y-bend balanced tree structure of the embedded database of said directory service, and the directory service data of obtaining in the said back end comprise:
In directory service metadata cache object set, inquire about directory service metadata cache object corresponding according to said crucial matching value, obtain the directory service data with it;
When in directory service metadata cache object set, not inquiring with the corresponding directory service metadata cache of said crucial matching value object; In the y-bend balanced tree structure of the embedded database of said directory service, search back end corresponding according to said crucial matching value, obtain the directory service data in the said back end with it.
Said method preferably, is adjusted said embedded database y-bend balanced tree structure, makes it be in equilibrium state and comprises:
Judge the minimum unbalance subtree of y-bend balanced tree structure of said embedded database;
Adjust minimum unbalance sub-tree structure, make it be in equilibrium state.
Said method, preferably, said said directory service data are stored as the directory service cache object comprises:
Said 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 realization and the application of said method in reality; This system applies is provided with embedded database in the said LIST SERVER in the directory service storehouse, said embedded database is a y-bend balanced tree structure; Said system comprises directory service data memory module, balance module and directory service data retrieval module, wherein:
Said directory service data memory module; Be used to obtain the directory service data; With said directory service data encapsulation is back end; Said back end comprises directory service data key value, and said back end is inserted in the said embedded database y-bend balanced tree structure, stores as a tree node of said y-bend balanced tree;
Said balance module is used to adjust the structure of said embedded database y-bend balanced tree, makes it be in equilibrium state;
Said directory service data retrieval module; The user is used for when need retrieve to the directory service data; Receive the directory service data query request that the user sends; Said data query request comprises the crucial matching value of required query directory service data, in the y-bend balanced tree structure of the embedded database of said directory service, searches back end corresponding with it according to said crucial matching value, obtains the directory service data in the said back end.
Said system, preferably, said system comprises that also index goes match filtering rule setting module and directory service data directory module:
Said index removes match filtering rule setting module, is used to set index and goes the match filtering rule;
Said directory service data directory module; Be used for extracting the directory service data index value according to said crucial matching value; Go the match filtering rule in the y-bend balanced tree structure of the embedded database of said directory service, to filter out the back end scope with the corresponding directory service data of said directory service index value according to said directory service data index value or predefined index, and then according to inquiry and the corresponding back end of said crucial matching value in the back end scope of the directory service data of said crucial matching value after said filtration.
Said system, preferably, said system also comprises buffer memory center and directory service metadata cache retrieval module:
Said buffer memory center is used for the directory service data that inquire are stored as directory service metadata cache object;
Said directory service metadata cache retrieval module is used for inquiring about directory service metadata cache object corresponding with it according to said crucial matching value in the heart at said buffer memory, obtains the directory service data.
In sum; A kind of directory service data retrieval method provided by the invention and system thereof; Based on the storage mode of embedded database, become back end to be stored in the tree node of structure of y-bend balanced tree the directory service data encapsulation, in each tree node, contain the pointer information that points to its next node; In tree-like hierarchical structure, retrieve, accelerated retrieval rate.When retrieval, introduce index mechanism, first search index value is dwindled range of search before data retrieval, has accelerated the speed of query directory service data.Introduce caching technology in addition; The directory service data of having inquired about are put into buffer memory; When in inquiring about buffer memory, not having the directory service data that to inquire about, from database, search again, avoided consume and system waste the extra time that direct data query is brought from database thus; Make the efficient of search visit improve greatly, thereby improved the runnability of application program.
Certainly, arbitrary product of enforcement the application might not reach above-described all advantages simultaneously.
Description of drawings
In order to be illustrated more clearly in the technical scheme among the application embodiment; The accompanying drawing of required use is done to introduce simply in will describing embodiment below; Obviously, the accompanying drawing in describing below only is some embodiment of the application, for those of ordinary skills; Under the prerequisite of not paying creative work property, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the method flow diagram of a kind of directory service data retrieval method embodiment one provided by the invention;
Fig. 2 is the data structure diagram of the LIST SERVER of a kind of directory service data retrieval method embodiment one provided by the invention;
Fig. 3 is a kind of directory service data retrieval method embodiment two provided by the invention introduces indexing means when data retrieval a part method flow diagram;
Fig. 4 is the data structure diagram of the LIST SERVER of a kind of directory service data retrieval method embodiment two provided by the invention;
Fig. 5 is the introducing caching method part method flow diagram of a kind of directory service data retrieval method embodiment three provided by the invention when data retrieval;
Fig. 6 is the structural representation of a kind of directory service data retrieval system embodiment four provided by the invention;
Fig. 7 is the structural representation of a kind of directory service data retrieval system embodiment five provided by the invention;
Fig. 8 is the structural representation of a kind of directory service data retrieval system embodiment six provided by the invention;
Fig. 9 is the another kind of structural representation of a kind of directory service data retrieval system embodiment six provided by the invention.
Embodiment
To combine the accompanying drawing among the application embodiment below, the technical scheme among the application embodiment is carried out clear, intactly description, obviously, described embodiment only is the application's part embodiment, rather than whole embodiment.Based on the embodiment among the application, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the application's protection.
Embodiment one
With reference to shown in Figure 1; Be the process flow diagram of a kind of directory service data retrieval method provided by the invention, said method is used for LIST SERVER, and said LIST SERVER is provided with embedded database; Said embedded database is a y-bend balanced tree structure, and said method comprises:
Step 101: obtain the directory service data; With said directory service data encapsulation is back end; Said back end comprises directory service data key value; Said back end is inserted in the said embedded database y-bend balanced tree structure, store as a tree node of said y-bend balanced tree.
Wherein, In the said y-bend balanced tree structure; The tree node node of except that root node, all likeing father, like son, and its father node at most also comprises a node except that this tree node, for each tree node in the said y-bend balanced tree structure promptly is provided with a balance factor as the back end of tree node storage; Represent said tree node about the depth difference of two sub-tree, promptly the left subtree degree of depth by said tree node deducts its right subtree degree of depth.
Need to prove; After said back end inserts said y-bend balanced tree structure; Can also the pointer information of the adjacent node of the tree node at the back end place of pointing to said insertion be deposited in the back end at back end place of said insertion; In each tree node especially tree node in same tree hierarchy, set up direct points relationship thus, after retrieving in, can accelerate retrieval rate.
Step 102: adjust the structure of said embedded database y-bend balanced tree, make it be in equilibrium state.
Wherein, After said back end inserts y-bend balanced tree structure; Its balance factor of father node of said back end place tree node changes, and the balance factor of other tree nodes in the said y-bend balanced tree structure may change, in the present invention; Can realize adjusting y-bend balanced tree structure through the data structure of building a stack and make it be in equilibrium state, process is following:
The stacked preservation of the pairing back end in insertion path when said back end is inserted said y-bend balanced tree structure;
After inserting completion, prepare the back end in the said stack is popped successively, judge whether the back end that is about to pop is the left sibling of current stack top data node; If then the balance factor of stack top data node adds 1, if not; Then the balance factor of stack top data node subtracts 1, pops then, and remaining back end is popped by above rule successively in the stack; And find its balance factor absolute value greater than 1 back end, the unbalance point in the promptly said y-bend balanced tree structure;
In the unbalance point of finding out, judge unbalance minimum subtree in the said y-bend balanced tree structure, and the said unbalance minimum subtree of rotation adjustment, make said y-bend balanced tree structure be in equilibrium state.
Step 103: when the user need retrieve the directory service data; Receive the directory service data query request that the user sends; Said data query request comprises the crucial matching value of required query directory service data; In the y-bend balanced tree structure of the embedded database of said directory service, search back end corresponding according to said crucial matching value, obtain the directory service data in the said back end with it.
Through step 101-step 102, can find out that said 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 y-bend balanced tree structure, and " dc=61s; dc=com " is benchmark with domain name; Below it, divide level according to ou, cn etc. respectively, clear in structure between each layer, data organization 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 in LDAP, storing according to back end; Inquire about one by one, inquire about the back end of cn=computing machine 1 earlier, then inquire about the back end of cn=computing machine 2; Find the back end of cn=computing machine 3 again, then return the directory service data that search after finding.
The foregoing description based on the storage mode of embedded database, becomes back end to be stored in the tree node of structure of y-bend balanced tree the directory service data encapsulation, in tree-like hierarchical structure, retrieves, and has accelerated retrieval rate.Thereby improved the runnability of application program.
Embodiment two
With reference to shown in Figure 3; A kind of directory service data retrieval method embodiment two that provides for the embodiment of the invention; Be used for LIST SERVER; Said LIST SERVER is provided with embedded database; Said database is a y-bend balanced tree structure, based on the directory service data retrieval method step 101-step 103 that the embodiment of the invention one provides, in the y-bend balanced tree structure of the embedded database of said directory service, searches back end corresponding with it according to said crucial matching value in the said step 103 and comprises:
Step 301: go the match filtering rule according to the said crucial matching value extraction directory service data index value or the setting index of the directory service data of inquiry of needing.
Wherein, said directory service index value can comprise following several types:
Certain definite value relevant with said directory service data, for example Equality index or Value index, the search form is ' ObjectClasses=person ' or ' attribute=mail ';
With the relevant character string of said directory service data, for example SubString index;
With said directory service data approximate relevant certain definite value or character string, for example Approximate index or Ordering index.
Step 302: go the match filtering rule in the y-bend balanced tree structure of the embedded database of said directory service, to filter from the corresponding directory service back end of said directory service index value scope according to said directory service data index value or index.
Step 303: according to inquiry back end corresponding in the back end scope of the directory service data of said crucial matching value after said filtration with it.
Wherein, with reference to shown in Figure 4, be the y-bend balanced tree structural drawing of the embedded database of a certain LIST SERVER, if data query node " cn=c3; ou=ou2, o=dep2 " among the figure during no index, is searched the back end of cn=c3; It is the sequencing of in LDAP, storing according to back end, searches one by one, earlier the back end of inquiry cn=c1; Then inquire about the back end of cn=c2, the back end at inquiry cn=c3 just finds and then returns Query Information.When setting up index, then 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 the 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 Search Results.
When the catalog service data, can also preestablish index and go the match filtering rule, the retrieval by window scope improves retrieval rate fast.
Hence one can see that; The index of reference technology can be accelerated the retrieval rate of directory service data effectively; Especially when the data volume of need handling in the LIST SERVER is very big, setting up index and be necessary also is the necessary condition of retrieval fast, thereby improves the runnability of application program.
Embodiment three
With reference to shown in Figure 5; A kind of directory service data retrieval method embodiment three process flow diagrams provided by the invention are used for LIST SERVER, and said LIST SERVER is provided with embedded database; Said database is a y-bend balanced tree structure; Before end, behind the primary retrieval, the directory service data of having inquired about are stored as directory service metadata cache object, form directory service metadata cache object set; Said directory service metadata cache object comprises the key value of directory service data; Based on the search method step 101-step 103 of the embodiment of the invention one, in the y-bend balanced tree structure of the embedded database of said directory service, search back end corresponding according to said crucial matching value described in the said step 103 with it, the directory service data of obtaining in the said back end comprise:
Step 501: in directory service metadata cache object set, inquire about directory service metadata cache object corresponding according to the said crucial matching value of directory service data of inquiry that needs, obtain the directory service data with it.
Wherein, Said directory service metadata cache object uses the data structure of hashtable (Hash table) to store; Whether the inspection cache set is full earlier when the said directory service metadata cache object of storage, if do not have, so said directory service metadata cache object adds in the said directory service metadata cache object set smoothly; If said directory service metadata cache object set is quota, in said cache set, take out a directory service metadata cache object so.
Need to prove that said method can realize said caching method through definition Memory Store interface.
Step 502: when in directory service metadata cache object set, not inquiring with the corresponding directory service metadata cache of said crucial matching value object; In the y-bend balanced tree structure of the embedded database of said directory service, search back end corresponding according to said crucial matching value, obtain the directory service data in the said back end with it.
The foregoing description; LIST SERVER is when data retrieval; Whether inquiry exists and the corresponding directory service metadata cache of the crucial matching value of said directory service data object in the directory service metadata cache set now, if having, so directly in said directory service metadata cache object, obtains the directory service data; If no, can continue retrieval according to the search method of two kinds of the embodiment of the invention one or the embodiment of the invention so.
Through the embodiment of the invention, when LIST SERVER when handling the larger data amount, can improve the situation that the LIST SERVER response speed that when a certain data are sent application, causes simultaneously because of a plurality of users reduces rapidly, improved the data retrieval performance to a great extent.
Embodiment four
With reference to shown in Figure 6; The structural representation of a kind of directory service data retrieval system embodiment four provided by the invention, the search method to realize that the inventive method embodiment one provides is applied in the directory service storehouse; Be provided with embedded database in the said LIST SERVER; Said embedded database is a y-bend balanced tree structure, and said system comprises directory service data memory module 601, balance module 602 and directory service data retrieval module 603, wherein:
Said directory service data memory module 601; Be used to obtain the directory service data; With said directory service data encapsulation is back end; Said back end comprises directory service data key value, and said back end is inserted in the said embedded database y-bend balanced tree structure, stores as a tree node of said y-bend balanced tree.
Wherein, In the said y-bend balanced tree structure; The tree node node of except that root node, all likeing father, like son, and its father node at most also comprises a node except that this tree node, for each tree node in the said y-bend balanced tree structure promptly is provided with a balance factor as the back end of tree node storage; Represent said tree node about the depth difference of two sub-tree, promptly the left subtree degree of depth by said tree node deducts its right subtree degree of depth.
Need to prove; After said directory service data memory module 601 inserts said back end said y-bend balanced tree structure; Can also the pointer information of the adjacent node of the tree node at the back end place of pointing to said insertion be deposited in the back end at back end place of said insertion; In each tree node especially tree node in same tree hierarchy, set up direct points relationship thus; After said directory service data retrieval module 603 retrievings in, can accelerate retrieval rate.
Said balance module 602 is used to adjust the structure of said embedded database y-bend balanced tree, makes it be in equilibrium state.
Wherein, After said directory service data memory module 601 inserts y-bend balanced tree structure with said back end; Its balance factor of father node of said back end place tree node changes, and the balance factor of other tree nodes in the said y-bend balanced tree structure may change, in the present invention; Can realize adjusting y-bend balanced tree structure through the data structure of building a stack and make it be in equilibrium state, process is following:
The stacked preservation of the pairing back end in insertion path when said directory service data memory module 601 inserts said y-bend balanced tree structure with said back end;
After inserting completion, to prepare the back end in the said stack is popped successively, said directory service data memory module 601 judges whether the back end that is about to pop is the left sibling of current stack top data node; If; Then the balance factor of stack top data node adds 1, if not, then the balance factor of stack top data node subtracts 1; Pop then; Remaining back end is popped by above rule successively in the stack, and finds its balance factor absolute value greater than 1 back end, the unbalance point in the promptly said y-bend balanced tree structure;
In the unbalance point of finding out, said directory service data memory module 601 is judged unbalance minimum subtree in the said y-bend balanced tree structure, and the said unbalance minimum subtree of rotation adjustment, makes said y-bend balanced tree structure be in equilibrium state.
Said directory service data retrieval module 603; The user is used for when need retrieve to the directory service data; Receive the directory service data query request that the user sends; Said data query request comprises the crucial matching value of required query directory service data, in the y-bend balanced tree structure of the embedded database of said directory service, searches back end corresponding with it according to said crucial matching value, obtains the directory service data in the said back end.
The directory service data are stored with the structure of the y-bend balanced tree of embedded database through the storage adjustment back of said directory service data memory module 601 and said balance module 602; On said LIST SERVER, with tree structure and adopt hierarchical structure, inquiry fast and effeciently can be provided.
Embodiment five
With reference to 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 two provided by the invention; Said system comprises that directory service data memory module 601, balance module 602, index go match filtering rule setting module 604 and directory service data directory module 605; Said directory service data memory module 601, balance module 602 are with similar described in the embodiment three, wherein:
Said index removes match filtering rule setting module 604, is used to set index and goes the match filtering rule;
Said directory service data directory module 605; Be used for extracting the directory service data index value according to said crucial matching value; Go the match filtering rule in the y-bend balanced tree structure of the embedded database of said directory service, to filter out the back end scope with the corresponding directory service data of said directory service index value according to said directory service data index value or predefined index; And then, obtain the directory service data in the said back end according to inquiry and the corresponding back end of said crucial matching value in the back end scope of the directory service data of said crucial matching value after said filtration.
Wherein, the directory service data index value of said directory service data directory module 605 extractions comprises following several types:
Certain definite value relevant with said directory service data, for example Equality index or Value index, the search form is ' ObjectClasses=person ' or ' attribute=mail ';
With the relevant character string of said directory service data, for example SubString index;
With said directory service data approximate relevant certain definite value or character string, for example Approximate index or Ordering index.
Wherein, with reference to shown in Figure 4, be the y-bend balanced 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, ou=ou2, o=dep2 " among the figure; During no index, said directory service data retrieval module 603 is searched the back end of cn=c3, and it is the sequencing of in LIST SERVER, storing according to back end; Search one by one, inquire about the back end of cn=c1 earlier, then inquire about the back end of cn=c2; Back end at inquiry cn=c3 just finds and then returns Query Information.When setting up index, then 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 said 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 Search Results.
When the index list service data, can also go match filtering rule setting module 604 to create index through said index and go the match filtering rule, the retrieval by window scope improves retrieval rate fast.
Hence one can see that; Utilize index technology can accelerate the retrieval rate of directory service data effectively through directory service data directory module; Especially when the data volume that needs in the LIST SERVER to handle is very big; Setting up index and be necessary also is the necessary condition of retrieval fast, thereby improves the runnability of application program.
Embodiment six
With reference to shown in Figure 8; The structural representation of a kind of directory service searching system embodiment six that the present invention improves is based on the embodiment of the invention four, to realize the method for embodiment three provided by the invention; Said system also comprises buffer memory center 606 and directory service metadata cache retrieval module 607, wherein:
Said buffer memory center 606 is used for the directory service data that inquire are stored as directory service metadata cache object;
Said directory service metadata cache retrieval module 607, be used for according to said crucial matching value at said buffer memory center 606 the inquiry directory service metadata cache object corresponding with it, obtain the directory service data.
Wherein, Store said directory service metadata cache object at said buffer memory center 606 with the data structure of hashtable; And the maximum amount of said directory service metadata cache object is set in said buffer memory center 606; When the directory service metadata cache number of objects in the said buffer memory center 606 reaches its maximum amount, represent full.
Need to prove that said method can realize said caching method through definition Memory Store interface in said directory service metadata cache retrieval module 607.
The foregoing description; Before in the y-bend balanced tree structure of said directory service data retrieval module 603, inquiring about said directory service data through said directory service metadata cache retrieval module 607 at embedded database; Whether 606 inquiries contain and the corresponding directory service metadata cache of said crucial matching value object at said buffer memory center earlier; If have; Directly in said directory service metadata cache object, obtain the directory service data, if not, again through said directory service data retrieval module 603 catalog service data in the y-bend balanced tree structure of said embedded database.
With reference to shown in Figure 9; When not inquiring in the said buffer memory center 606 with the corresponding directory service metadata cache of said crucial matching value object; Can also go match filtering rule setting module 604 and said directory service data directory module 605 in the y-bend balanced tree structure of said embedded database, to retrieve and the corresponding directory service back end of said crucial matching value through index, obtain said directory service data.
Pass through the embodiment of the invention; When LIST SERVER when handling the larger data amount; Can improve because of a plurality of users send the situation that LIST SERVER response speed that application the time causes reduces rapidly to a certain data simultaneously, improve search efficiency, introduce index technology simultaneously; Only a step is improved retrieval rate, improves the data retrieval performance to a greater extent.
More than a kind of directory service data retrieval method and system that the application provided have been carried out detailed introduction; Used concrete example among this paper the application's principle and embodiment are set forth, the explanation of above embodiment just is used to help to understand the application's method and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to the application's thought, the part that on embodiment and range of application, all can change, in sum, this description should not be construed as the restriction to the application.

Claims (10)

1. a directory service data retrieval method is characterized in that, this method is applied to LIST SERVER, is provided with embedded database in the said LIST SERVER, and said embedded database is a y-bend balanced tree structure, and said method comprises:
Obtain the directory service data; With said directory service data encapsulation is back end; Said back end comprises directory service data key value, and said back end is inserted in the said embedded database y-bend balanced tree structure, stores as a tree node of said y-bend balanced tree;
Adjust the structure of said embedded database y-bend balanced tree, make it be in equilibrium state;
When the user need retrieve the directory service data; Receive the directory service data query request that the user sends; Said data query request comprises the crucial matching value of required query directory service data; In the y-bend balanced tree structure of the embedded database of said directory service, search back end corresponding according to said crucial matching value, obtain the directory service data in the said back end with it.
2. method according to claim 1; It is characterized in that; The said directory service data of obtaining; With said directory service data encapsulation is back end, and said back end is inserted in the said embedded database y-bend balanced tree structure, also comprises after storing as a tree node of said y-bend balanced tree:
The pointer information of the adjacent tree node of the tree node that points to said back end place is deposited in the tree node at said back end place.
3. method according to claim 1 is characterized in that, the said crucial matching value of said foundation is searched back end corresponding with it and comprised in the y-bend balanced tree structure of the embedded database of said directory service:
Extract the directory service data index value according to said crucial matching value, go the match filtering rule in the y-bend balanced tree structure of the embedded database of said directory service, to filter out the back end scope with the corresponding directory service data of said directory service index value according to said directory service data index value or predefined index;
According to inquiry and the corresponding back end of said crucial matching value in the back end scope of the directory service data of said crucial matching value after said filtration.
4. method according to claim 1 is characterized in that, said method also comprises:
The directory service data of having inquired about are stored as directory service metadata cache object, form directory service metadata cache object set, said directory service metadata cache object comprises the buffer memory key value of directory service data.
5. method according to claim 4; It is characterized in that; The said crucial matching value of said foundation is searched back end corresponding with it in the y-bend balanced tree structure of the embedded database of said directory service, the directory service data of obtaining in the said back end comprise:
In directory service metadata cache object set, inquire about directory service metadata cache object corresponding according to said crucial matching value, obtain the directory service data with it;
When in directory service metadata cache object set, not inquiring with the corresponding directory service metadata cache of said crucial matching value object; In the y-bend balanced tree structure of the embedded database of said directory service, search back end corresponding according to said crucial matching value, obtain the directory service data in the said back end with it.
6. method according to claim 1 is characterized in that, adjusts said embedded database y-bend balanced tree structure, makes it be in equilibrium state and comprises:
Judge the minimum unbalance subtree of y-bend balanced tree structure of said embedded database;
Adjust minimum unbalance sub-tree structure, make it be in equilibrium state.
7. method according to claim 4 is characterized in that, said said directory service data are stored as the directory service cache object comprises:
Said directory service data are stored with the data structure of Hash table as the directory service cache object.
8. directory service data retrieval system; It is characterized in that; Be applied in the directory service storehouse, be provided with embedded database in the said LIST SERVER, said embedded database is a y-bend balanced tree structure; Said system comprises directory service data memory module, balance module and directory service data retrieval module, wherein:
Said directory service data memory module; Be used to obtain the directory service data; With said directory service data encapsulation is back end; Said back end comprises directory service data key value, and said back end is inserted in the said embedded database y-bend balanced tree structure, stores as a tree node of said y-bend balanced tree;
Said balance module is used to adjust the structure of said embedded database y-bend balanced tree, makes it be in equilibrium state;
Said directory service data retrieval module; The user is used for when need retrieve to the directory service data; Receive the directory service data query request that the user sends; Said data query request comprises the crucial matching value of required query directory service data, in the y-bend balanced tree structure of the embedded database of said directory service, searches back end corresponding with it according to said crucial matching value, obtains the directory service data in the said back end.
9. system according to claim 8 is characterized in that, said system comprises that also index goes match filtering rule setting module and directory service data directory module:
Said index removes match filtering rule setting module, is used to set index and goes the match filtering rule;
Said directory service data directory module; Be used for extracting the directory service data index value according to said crucial matching value; Go the match filtering rule in the y-bend balanced tree structure of the embedded database of said directory service, to filter out the back end scope with the corresponding directory service data of said directory service index value according to said directory service data index value or predefined index, and then according to inquiry and the corresponding back end of said crucial matching value in the back end scope of the directory service data of said crucial matching value after said filtration.
10. system according to claim 8 is characterized in that, said system also comprises buffer memory center and directory service metadata cache retrieval module:
Said buffer memory center is used for the directory service data that inquire are stored as directory service metadata cache object;
Said directory service metadata cache retrieval module is used for inquiring about directory service metadata cache object corresponding with it according to said crucial matching value in the heart at said buffer memory, obtains 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 true CN102521375A (en) 2012-06-27
CN102521375B 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)

Cited By (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
CN103366014A (en) * 2013-07-30 2013-10-23 汉柏科技有限公司 Cluster-based cloud computing network data processing system and method
CN105426389A (en) * 2015-10-26 2016-03-23 武汉微创光电股份有限公司 Fuzzy retrieval locating method based on UI directory tree view
CN105808745A (en) * 2016-03-11 2016-07-27 中国联合网络通信集团有限公司 Data retrieval method and equipment
CN108924215A (en) * 2018-06-28 2018-11-30 北京顺丰同城科技有限公司 A kind of service discovery processing method and processing device based on tree structure
CN111226205A (en) * 2017-08-31 2020-06-02 美光科技公司 KVS tree database
CN114491172A (en) * 2022-04-07 2022-05-13 深圳竹云科技股份有限公司 Method, device and equipment for quickly searching tree structure nodes and storage medium

Citations (6)

* 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
US20060026138A1 (en) * 2004-01-09 2006-02-02 Gavin Robertson Real-time indexes
CN101256579A (en) * 2008-04-08 2008-09-03 中兴通讯股份有限公司 Method for inquesting data organization in database
US20090182766A1 (en) * 2008-01-16 2009-07-16 International Business Machines Corporation Avoiding database related joins with specialized index structures
CN101763415A (en) * 2009-12-16 2010-06-30 北京握奇数据系统有限公司 Method and device for generating B tree index of database

Patent Citations (6)

* 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
US20060026138A1 (en) * 2004-01-09 2006-02-02 Gavin Robertson Real-time indexes
US20090182766A1 (en) * 2008-01-16 2009-07-16 International Business Machines Corporation Avoiding database related joins with specialized index structures
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

Cited By (11)

* 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
CN103366014A (en) * 2013-07-30 2013-10-23 汉柏科技有限公司 Cluster-based cloud computing network data processing system and method
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
CN105808745A (en) * 2016-03-11 2016-07-27 中国联合网络通信集团有限公司 Data retrieval method and equipment
CN105808745B (en) * 2016-03-11 2019-06-28 中国联合网络通信集团有限公司 A kind of data retrieval method and server
CN111226205A (en) * 2017-08-31 2020-06-02 美光科技公司 KVS tree database
CN111226205B (en) * 2017-08-31 2021-08-31 美光科技公司 KVS tree database
CN108924215A (en) * 2018-06-28 2018-11-30 北京顺丰同城科技有限公司 A kind of service discovery processing method and processing device based on tree structure
CN108924215B (en) * 2018-06-28 2021-03-19 北京顺丰同城科技有限公司 Service discovery processing method and device based on tree structure
CN114491172A (en) * 2022-04-07 2022-05-13 深圳竹云科技股份有限公司 Method, device and equipment for quickly searching tree structure nodes and storage medium

Also Published As

Publication number Publication date
CN102521375B (en) 2013-12-11

Similar Documents

Publication Publication Date Title
CN102521375B (en) Directory service data retrieval method and directory service data retrieval system
US8572127B2 (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
US6374253B1 (en) System and method for generating hierarchical forward knowledge
CN101315640B (en) Directory management method and apparatus
CN106326361B (en) Data query method and device based on HBase database
US8145674B2 (en) Structure based storage, query, update and transfer of tree-based documents
US6490589B1 (en) System and method for rewriting queries
EP2629212A1 (en) Method for storing and searching tagged content items in a distributed system
CN105138592A (en) Distributed framework-based log data storing and retrieving method
US20040205047A1 (en) Method for dynamically generating reference indentifiers in structured information
WO2006026534A2 (en) Optimal storage and retrieval of xml data
US8015195B2 (en) Modifying entry names in directory server
KR101224800B1 (en) Crawling database for infomation
KR20110031931A (en) Method for mapping an x500 data model onto a relational database
CN103902705B (en) Metadata-based cross-mechanism cloud digital content integration system and metadata-based cross-mechanism cloud digital content integration method
CN102378407B (en) Object name resolution system and method in internet of things
Ko et al. A binary string approach for updates in dynamic ordered XML data
US20080133587A1 (en) Extending Existing Data within a Directory Service
KR100999408B1 (en) Method for searching an ??? using hash tree
US8949282B1 (en) Efficient storage of non-searchable attributes
CN108984626A (en) A kind of data processing method, device and server
US8930336B2 (en) Retrieval of searchable and non-searchable attributes

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