CN103049553A - Method, device and system for searching route storage - Google Patents

Method, device and system for searching route storage Download PDF

Info

Publication number
CN103049553A
CN103049553A CN2012105847782A CN201210584778A CN103049553A CN 103049553 A CN103049553 A CN 103049553A CN 2012105847782 A CN2012105847782 A CN 2012105847782A CN 201210584778 A CN201210584778 A CN 201210584778A CN 103049553 A CN103049553 A CN 103049553A
Authority
CN
China
Prior art keywords
hash
hash keys
keys
searching route
search key
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
CN2012105847782A
Other languages
Chinese (zh)
Other versions
CN103049553B (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.)
Guangdong Gaohang Intellectual Property Operation Co ltd
Haining hi tech Zone Science and Innovation Center Co.,Ltd.
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201210584778.2A priority Critical patent/CN103049553B/en
Publication of CN103049553A publication Critical patent/CN103049553A/en
Application granted granted Critical
Publication of CN103049553B publication Critical patent/CN103049553B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

An embodiment of the invention provides a method, a device and a system for searching route storage, relates to the field of communication, and is used for reducing storage space waste and increasing utilization rate of storage space. The method includes: analyzing to-be-searched data to acquire at least one key data; generating at least one hash key pair according to the key data; and storing the hash key pairs; wherein the searching route comprises at least one hash key pair, each hash key pair comprises a first element and a second element, and the second element one level upper than the first element. The method is applicable to occasions of data storage and searching.

Description

A kind of method, Apparatus and system of searching route storage
Technical field
The present invention relates to the communications field, relate in particular to a kind of method, Apparatus and system of searching route storage.
Background technology
XML (Extensible Markup Language, extend markup language) being used for the electroactive marker son file makes it have structural markup language, can be used for flag data, definition data type, the source language that to be a kind of user of permission define oneself markup language.XML can separate document content and display format, and the mark in the document is the implication of describing the XML data element, rather than is used for describing and how shows, so XML is a kind of data of self-described.
XML becomes the standard of internet data performance and exchanges data day by day, and how to retrieve effective information from a large amount of XML information has become urgent problem.At present, before XML information is retrieved, need first XML information to be resolved, obtain structurized searching route.According to the key word that the user provides, utilize structurized searching route, XML is retrieved, recall precision can be provided.Because the XML data volume is large, behind analyzing XML, how efficient storage is resolved rear huge structure tree information has become more and more problems of concern of industry.In the prior art, huge structure tree information is based on that the coding of prefix stores after the storing and resolving.
The coding of stating in realization based on prefix carries out in the process of storage node paper mulberry information, and the inventor finds that there are the following problems at least in the prior art: the storage mode based on the coded message of prefix is stored in redundant information.And along with the degree of depth of tree increases, redundant information is exponential increase, thereby causes the waste of storage space.
Summary of the invention
Embodiments of the invention provide a kind of method, Apparatus and system of searching route storage, in order to realize reducing the waste of storage space, improve the utilization factor of storage space.
For achieving the above object, embodiments of the invention adopt following technical scheme:
First aspect, the embodiment of the invention provide a kind of method of searching route storage, comprising: data to be retrieved are resolved, obtain at least one critical data; According to described at least one critical data, generate at least one Hash keys pair; Wherein, searching route by at least one described Hash keys to forming; Described Hash keys is to comprising: the first element and the second element; The upper level element that described the second element is described the first element; Store described at least one Hash keys pair.
Second aspect, the embodiment of the invention provide a kind of device of searching route storage, comprising: acquiring unit, be used for data to be retrieved are resolved, and obtain at least one critical data; Generation unit is used for according to described at least one critical data, generates at least one Hash keys pair; Wherein, searching route by at least one described Hash keys to forming; Described Hash keys is to comprising: the first element and the second element; The upper level element that described the second element is described the first element; Storage unit is used for storing described at least one Hash keys that described resolution unit obtains pair.
The third aspect, the embodiment of the invention provide a kind of system of searching route storage, comprising: host node, switch, service server, terminal; Wherein, described host node is the device of the searching route storage described in above-described embodiment.
The embodiment of the invention provides method, the Apparatus and system of a kind of searching route storage, and by data to be tested are resolved, the critical data that parses according to the critical data that parses, is obtained Hash keys pair, and stores described Hash keys pair.Like this, each Hash keys of storage has reduced redundant information to only having two elements, thereby has realized reducing the waste of storage space, has improved the utilization factor of storage space.
Description of drawings
The synoptic diagram of the method for a kind of searching route storage that Fig. 1 provides for the embodiment of the invention;
The application synoptic diagram of the device of a kind of searching route storage that Fig. 2 provides for the embodiment of the invention;
The synoptic diagram of a kind of example that Fig. 3 provides for the embodiment of the invention;
The synoptic diagram of the method for the another kind of searching route storage that Fig. 4 provides for the embodiment of the invention;
The synoptic diagram of the method for the another kind of searching route storage that Fig. 5 provides for the embodiment of the invention;
The synoptic diagram of the another kind of example that Fig. 6 provides for the embodiment of the invention;
The structural representation of the device of a kind of searching route storage that Fig. 7 provides for the embodiment of the invention;
The structural representation of the device of the another kind of searching route storage that Fig. 8 provides for the embodiment of the invention;
The structural representation of the device of the another kind of searching route storage that Fig. 9 provides for the embodiment of the invention;
The structural representation of the system of a kind of searching route storage that Figure 10 provides for the embodiment of the invention.
Embodiment
Method, device, system to the storage of embodiment of the invention searching route is described in detail below in conjunction with accompanying drawing.
The embodiment of the invention provides a kind of method of searching route storage, as shown in Figure 1, comprising:
101, data to be retrieved are resolved, obtain at least one critical data.
Wherein, described critical data is for the data that make up searching route.
Need to prove, when searching route refers to retrieve according to the retrieval critical data that receives, employed path.
Concrete, the device of searching route storage is resolved the content of data to be retrieved, parses critical data from the content of data to be retrieved.Preferably, data to be retrieved are resolved, obtaining version is the critical data of tree type.Be, Data Analysis to be retrieved gone out the critical data of tree.
Optionally, data to be retrieved are XML (Extensible Markup Language, extend markup language) data.
Need to prove that data to be retrieved during other forms of retrieval, are the data of retrieve data content also, the present invention does not limit this.
Need to prove that the device of described searching route can be a kind of computing equipment, referred to as main frame, as shown in Figure 2.Wherein, main frame can comprise any computing equipment that current techniques is known, such as server, desk-top computer etc.Inner at main frame, operating system and other application programs are installed, the present invention does not limit this.
102, according to described at least one critical data, generate at least one Hash keys pair.
Wherein, searching route by at least one described Hash keys to forming.Described Hash keys is to comprising: the first element and the second element.The upper level element that described the second element is described the first element.The first element is a critical data, and the second element is the upper level data of this critical data.
Concrete, the device of searching route storage is after having obtained at least one critical data, and with each element of at least one critical data of obtaining, the upper level element of element therewith generates Hash keys pair.
Further, if the version of at least one critical data is the tree type, be the critical data of tree type according to described version then, generate at least one Hash keys pair.Be, each node in the tree and father node thereof are generated a Hash keys pair.
Need to prove that each node in the tree is a critical data, this moment, the first right element of described Hash keys was a node in the critical data of tree; The second element that described Hash keys is right is the father node of described the first element.
Exemplary, the critical data of hypotheses creation is tree, as shown in Figure 3.The critical data that generates comprises: root node is life range, and root node has three child nodes, is respectively country, island and lake.Wherein, there are three child nodes in country, is respectively population, name, city.There are three byte points in the city, is respectively population, sign, name.There are two child nodes on island, are respectively name, the area.There are two child nodes in the lake, is respectively name, the area.Each node of the critical data of tree and father node thereof are generated Hash keys pair.Wherein, with each node as the first right element of Hash keys, with its father node as the second right element of Hash keys.The Hash keys that generates is to as shown in table 1 below.
Table 1
<area, island 〉
<area, the lake 〉
<city, country 〉
<country, life circle 〉
<sign, the city 〉
<island, life circle 〉
<lake, life circle 〉
<name, country 〉
<name, the city 〉
<name, island 〉
<name, the lake 〉
<population, country 〉
<population, the city 〉
103, storage described at least one Hash keys pair.
Concrete, at least one Hash keys that the device storage of searching route storage generates pair.Optionally, the device of searching route storage can according to default hash algorithm, obtain described at least one Hash keys to the cryptographic hash of correspondence; According to the cryptographic hash of described at least one Hash keys to correspondence, with described at least one Hash keys pair, be stored to described at least one Hash keys position corresponding to the cryptographic hash of correspondence.
Need to prove that default hash algorithm is that the device of searching route storage sets in advance.
Wherein, the device of searching route storage can obtain the cryptographic hash of the first right element of Hash keys according to default hash algorithm, according to this cryptographic hash Hash keys that this cryptographic hash is corresponding to storing so far position corresponding to cryptographic hash.
As above routine described, suppose that default hash algorithm is the ASCI code of asking for the first letter of the first right element of Hash keys, and ask for remainder take 4 as divisor.Suppose according to above-mentioned default hash algorithm, ask for<area, island〉cryptographic hash be 3, general<area then, island〉be stored to the position that cryptographic hash is 3 correspondences.
Further, according to the cryptographic hash of described at least one Hash keys to correspondence, with described at least one Hash keys pair, be stored to described at least one Hash keys in memory node corresponding to the cryptographic hash of correspondence.
Concrete, the device of searching route storage with Hash keys to being stored to Hash keys in memory node corresponding to the cryptographic hash of correspondence.
Need to prove that the device management memory node of searching route storage is with reference to shown in Figure 2.Memory node can comprise the memory device that current techniques is known, such as Redundant Array of Independent Disks (RAID) (Redundant Arrays of Independent Disks, RAID), disk cluster (Justa Bunch Of Disks, JBOD), direct access storage device (Direct Access StorageDevice, the disc driver of one or more interconnection DASD), such as the fc tape storage device FC of tape library, one or more storage unit, the present invention does not limit this.
The embodiment of the invention provides the method for a kind of searching route storage, and by data to be tested are resolved, the critical data that parses according to the critical data that parses, is obtained Hash keys pair, and stores described Hash keys pair.Like this, each Hash keys of storage has reduced redundant information to only having two elements, thereby has realized reducing the waste of storage space, has improved the utilization factor of storage space.
After step 103, said method as shown in Figure 4, also comprises:
The data described to be retrieved of 104, will not resolve are stored in the described memory node.
Concrete, the device of searching route storage can be equally divided into the number of the described data based memory node to be retrieved of not resolving the first integral multiple of memory node.The first integer data to be retrieved can sequentially can be stored in each memory node.Also the first integer data based default hash algorithm to be retrieved can be generated corresponding cryptographic hash, the cryptographic hash of the first integer data based correspondence to be retrieved is stored in the corresponding memory node.
Need to prove that the first integer is to be not less than 1 integer.
Original data can be stored to memory node by step 104, so that when receiving search key, can inquire about according to the data of storage, thereby obtain the data relevant with search key.
After step 104, said method as shown in Figure 5, also comprises:
105, receive search key and search key type.
Concrete, if the user needs data query, then the user need input search key, and input search key type.For example, the user will inquire about the correlation circumstance in Xi'an, city, and then inputting the search key type is name, and search key is Xi'an, and then the device of searching route receives this search key, and the search key type.
106, according to described search key type, obtain the cryptographic hash of described search key type.
Concrete, after the device of searching route storage receives the search key type, with the default hash algorithm of search key type utilization, calculate the cryptographic hash of search key type.
Exemplary, the type that the device of searching route storage receives search key is name, then according to default hash algorithm, obtains cryptographic hash corresponding to name.
107, according to the cryptographic hash of the described search key type obtained, obtain the first Hash keys pair.
Wherein, described the first Hash keys Hash keys that the cryptographic hash that refers to according to the search key type is found pair.
Concrete, the device of searching route storage is according to the cryptographic hash of the described search key type of obtaining, and obtains cryptographic hash corresponding to memory location first Hash keys identical with the cryptographic hash of described search key type pair; The first element that described the first Hash keys of cycle index is right, and obtain the cryptographic hash of the second right element of described the first Hash keys; According to the cryptographic hash of the second right element of described described the first Hash keys of obtaining, obtain the second identical Hash keys of the cryptographic hash of the second right element of cryptographic hash corresponding to memory location and described the first Hash keys pair; According to the identical Hash keys of the cryptographic hash of the second right element of cryptographic hash corresponding to described memory location and described the first Hash keys pair, upgrade described the first Hash keys pair, until the second Hash keys of obtaining is to for empty; Record the second right element of the first Hash keys.
Wherein, the first element that described the second Hash keys is right is the second right element of described the first Hash keys.
Specifically, after the device of searching route storage has obtained the cryptographic hash of search key type, search according to this cryptographic hash that to have stored Hash keys right, and position corresponding to this cryptographic hash.Hash keys is right having stored, and obtains the Hash keys pair that the search key type is the first element in position corresponding to this cryptographic hash, is to obtain the first Hash keys pair.Obtain the first Hash keys to rear, recording the first right element of the first Hash keys, be the record retrieval key word type, and obtaining the second right element of the first Hash keys.According to default hash algorithm, calculate the cryptographic hash of the second right element of the first Hash keys, search according to this cryptographic hash that to have stored Hash keys right, and the position corresponding to cryptographic hash of the second element that the first Hash keys is right, and obtain the second identical Hash keys of the cryptographic hash of the second right element of cryptographic hash corresponding to memory location and described the first Hash keys pair.That is to say that Hash keys is right having stored, and what obtain the second right element of the first Hash keys in position corresponding to the cryptographic hash of right the second element of the first Hash keys is second Hash keys pair of the first element.Obtaining the second Hash keys to rear, according to this second Hash keys to upgrading the first Hash keys pair, be existing the second Hash keys replacing the first Hash keys pair, thereby generate the first new Hash keys pair, repeat the first right element of record the first Hash keys, and according to default hash algorithm, calculate the cryptographic hash of the second right element of the first Hash keys, and the identical memory location of cryptographic hash of right the second element of the cryptographic hash of searching the memory location and the first Hash keys, obtain the second Hash keys pair, and then according to the second Hash keys to upgrading the first Hash keys pair, until the second Hash keys of obtaining is to for empty; Record the second right element of the first Hash keys.
Exemplary, as above routine described, be name if the user inputs the search key type, and, the device of searching route storage with Hash keys to being stored in the memory node.The device of searching route storage calculates the cryptographic hash of name according to default hash algorithm, the cryptographic hash of supposing the name that calculates is 2, search according to cryptographic hash 2 then that to have stored Hash keys right, the memory node of cryptographic hash 2 correspondences, be according to cryptographic hash 2, the cryptographic hash that finds the memory location is 2 memory location.In the memory node of cryptographic hash 2 correspondences, obtain name and be the Hash keys pair of the first element, be and obtain the first Hash keys pair.If the Hash keys that to have stored 4 the first elements in memory node be name pair, then with this 4 Hash keys to all being considered as the first Hash keys pair.These four first Hash keys are to being respectively<name country 〉,<name, the city 〉,<name, island 〉,<name, the lake 〉.The below is with<name, country〉describe for example.
The first Hash keys is to being<name country 〉, then record the first right element name of this first Hash keys, and obtain right the second element country of this first Hash keys.According to default hash algorithm, calculate the cryptographic hash of the second right element country of the first Hash keys, if the cryptographic hash of calculating is 1, then search the memory node of cryptographic hash 1 correspondence of the second right element country of the first Hash keys.In this memory node, obtain the first element and be the Hash keys pair of country, be and obtain the second Hash keys pair.Be the Hash keys of country pair if in memory node, only stored first element, then obtained second Hash keys pair.At this moment, the second Hash keys is to being<country life circle 〉., be the first Hash keys by<name, country upgrading the first Hash keys pair according to the second Hash keys be updated to<country life circle.Be updated to the first Hash keys to rear, record right the first element country of the first Hash keys.Obtain the second right element life circle of the first Hash keys.According to default hash algorithm, calculate the cryptographic hash of the second right element life circle of the first Hash keys, if the cryptographic hash of calculating is 2, then search the memory node of cryptographic hash 2 correspondences of the second right element life circle of the first Hash keys.In this memory node, obtain the first element and be the Hash keys pair of life range, be and obtain the second Hash keys pair, this moment cryptographic hash 3 correspondences memory node in do not store the Hash keys pair that the first element is life range, that is to say, the second Hash keys of obtaining records the second right element of the first Hash keys to for empty, is record life circle.At this moment, the data of record are name, country, life circle.Other three first Hash keys are right<name, the city 〉,<name, island 〉,<name, the lake〉disposal route, with the first Hash keys right<name, country〉disposal route identical, do not repeat them here, as shown in Figure 6.At this moment, the first Hash keys of obtaining is right<name, country〉the record content be name, country, life circle.The first Hash keys is right<name, the city〉the record content be name, city, country, life circle.The first Hash keys is right<name, island〉the record content be name, island, life circle.The first Hash keys is right<name, the lake〉the record content be name, lake, life circle.
108, according to described the first Hash keys of obtaining pair, set up searching route.
Concrete, the device of searching route storage is obtaining the first Hash keys to rear, according to this first Hash keys to setting up searching route.Further, device first element and described first Hash keys right second element right according at least one first Hash keys of described record of searching route storage, according to writing time, backward is set up searching route.
Wherein, backward is set up and to be referred to according to writing time, with arranged sequentially according to writing time from writing time the latest to writing time the earliest of record content.
Need to prove, owing to obtain the first Hash keys pair according to the search key type, the second element that Hash keys is right is the upper level element of the first element, so, when recording right the first element of the first Hash keys, the first element that the first Hash keys of current record is right is the upper level of the first right element of the first Hash keys of last record.The search key type of user's input is the first right element of the first Hash keys of first record.The second right element of the first Hash keys of record is last element at last, is the root node of tree.
Wherein, the device of searching route storage is according to the writing time of the second right element of right the first element of at least one first Hash keys and described the first Hash keys, with the content of record, according to from writing time the latest to the order of writing time the earliest, set up searching route.
Exemplary, upper example is described, at least one first element and the second element that 4 the first Hash keys obtaining are right, be respectively the first Hash keys right<name, country〉the record content be name, country, life circle.The first Hash keys is right<name, the city〉the record content be name, city, country, life circle.The first Hash keys is right<name, island〉the record content be name, island, life circle.The first Hash keys is right<name, the lake〉the record content be name, lake, life circle.With the first Hash keys right<name, country〉the record content be name, country, life circle is that example describes.
If the first Hash keys is right<name, country〉the record content be name, country, life circle.Wherein, the writing time of name, country took second place the earliest, and the writing time of life circle the latest.At this moment, according to arriving the earliest order of writing time writing time the latest, set up searching route, the searching route of setting up this moment is life range, country, name.Other three first Hash keys are to setting up the method for searching route, with the first Hash keys to being right<name, country the method for setting up searching route is identical, do not repeat them here.4 searching routes obtaining are: life circle, country, name; Life circle, country, city, name; Life circle, island, name; Life circle, lake, name.
109, treat retrieve data according to described searching route and described search key and retrieve, obtain retrieve data.
Concrete, the device of searching route storage has obtained searching route, finding data to be retrieved according to searching route retrieves, find with searching route under data to be retrieved, at this moment, search data to be retrieved under the searching route according to the search key of user input, thereby find the retrieve data relevant with search key.
Further, described at least one Hash keys to the situation that is stored to memory node under, the device of searching route storage is sent to described searching route and described search key in the right memory node of storage Hash keys, so that described memory node is according to described searching route and described search key, described described data to be tested of not resolving to storage are retrieved, and return retrieve data.The device of searching route storage receives the retrieve data that described memory node returns.
Optionally, the device of searching route storage is added into described searching route and described search key in the inquiry request message, and inquiry request message is sent in the right memory node of storage Hash keys.
Exemplary, as above routine described, 4 query and search paths that the device of searching route storage obtains are: life circle, country, name; Life circle, country, city, name; Life circle, island, name; Life circle, lake, name.4 searching routes that the device of searching route storage will obtain, and search key Xi'an of the user who receives input all is sent to and has stored in all right memory nodes of Hash keys.Memory node receives 4 searching routes that the device of searching route storage sends, and behind the search key Xi'an of user's input, according to 4 searching routes, and the data to be retrieved of not resolving of retrieve stored respectively.Exemplary, according to life circle, country, the data to be retrieved of not resolving of name search storage, after retrieving the data that conform to, search key Xi'an according to user's input, continue the data that retrieval conforms to, if in the data of storage, retrieve the national name retrieve data identical with Xi'an, then retrieve data is back to the device of searching route storage, do not retrieve the national name retrieve data identical with Xi'an, then the device to the searching route storage returns the relevant information that does not retrieve the national name that conforms to Xi'an.According to the data to be checked of not resolving of other three searching routes retrieve stored and according to life circle, country, the data to be retrieved of not resolving of name search storage are identical, do not repeat them here.
Memory node is life range in searching route only, country, the city, find out the retrieve data relevant with Xi'an under the searching route of name, do not retrieve relevant information under other searching routes, then the device of searching route storage can receive the retrieve data relevant with Xi'an of memory node feedback.
110, return described retrieve data.
Concrete, after the device of searching route storage receives the retrieve data relevant with Xi'an of memory node feedback, this retrieve data is fed back to subscriber equipment.
The embodiment of the invention provides the method for a kind of searching route storage, and by data to be tested are resolved, the critical data that parses according to the critical data that parses, is obtained Hash keys pair, and stores described Hash keys pair.Like this, each Hash keys of storage has reduced redundant information to only having two elements, thereby has realized reducing the waste of storage space, has improved the utilization factor of storage space.After receiving the search key and search key type of user input, according to the search key type, set up searching route, and according to the search key of this searching route and user's input, obtain the required retrieve data of user, and then feed back to the user.Improve inquiry velocity, thereby improved user's experience.
The embodiment of the invention provides a kind of device of searching route storage, as shown in Figure 7, comprising:
Acquiring unit 601 is used for data to be retrieved are resolved, and obtains at least one critical data.
Wherein, described critical data is for the data that make up searching route.
Need to prove, when searching route refers to retrieve according to the retrieval critical data that receives, employed path.
Concrete, described acquiring unit 601 specifically is used for, and data to be retrieved are resolved, and obtaining version is the critical data of tree type.
Generation unit 602 is used for described at least one critical data of obtaining according to described acquiring unit 601, generates at least one Hash keys pair.
Wherein, searching route by at least one described Hash keys to forming.Described Hash keys is to comprising: the first element and the second element; The upper level element that described the second element is described the first element.The first element is a critical data, and the second element is the upper level data of this critical data.
Concrete, described generation unit 602 specifically is used for, and the described version of obtaining according to described acquiring unit 601 is the critical data of tree type, generates at least one Hash keys pair.
At this moment, the first element that described Hash keys is right is a node in the critical data of tree; The second element that described Hash keys is right is the father node of described the first element.
Storage unit 603 is used for storing described at least one Hash keys that described generation unit 602 obtains pair.
Concrete, described storage unit 603 specifically is used for, and according to default hash algorithm, obtains described at least one Hash keys to the cryptographic hash of correspondence.According to the cryptographic hash of described at least one Hash keys to correspondence, with described at least one Hash keys pair, be stored to described at least one Hash keys in memory node corresponding to the cryptographic hash of correspondence.
Described storage unit 603, the described data to be tested that also are used for not resolving are stored to described memory node.
Further, the device of above-mentioned searching route storage as shown in Figure 8, also comprises:
Receiving element 604 is used for receiving search key and search key type.
Described acquiring unit 601 also is used for the described search key type according to described receiving element 604 receptions, obtains the cryptographic hash of described search key type.
Described acquiring unit 601 also is used for the cryptographic hash according to the described search key type of obtaining, and obtains the first Hash keys pair.
Wherein, described the first Hash keys Hash keys that the Hash lookup that refers to according to the search key type is arrived pair.
Concrete, described acquiring unit 601 specifically is used for, and according to the cryptographic hash of the described search key type of obtaining, obtains cryptographic hash corresponding to memory location first Hash keys identical with the cryptographic hash of described search key type pair.The first element that described the first Hash keys of cycle index is right, and obtain the cryptographic hash of the second right element of described the first Hash keys.According to the cryptographic hash of the second right element of described described the first Hash keys of obtaining, obtain the second identical Hash keys of the cryptographic hash of the second right element of cryptographic hash corresponding to memory location and described the first Hash keys pair; The first element that described the second Hash keys is right refers to the second element that described the first Hash keys is right.According to the identical Hash keys of the cryptographic hash of the second right element of cryptographic hash corresponding to described memory location and described the first Hash keys pair, upgrade described the first Hash keys pair, until the second Hash keys of obtaining is to for empty; Record the second right element of the first Hash keys.
Set up unit 605, be used for described the first Hash keys of obtaining according to described acquiring unit 601 pair, set up searching route.
Concrete, the described unit 605 of setting up specifically is used for, first element right according at least one first Hash keys of described record, and according to writing time, backward is set up searching route.
Wherein, backward is set up and to be referred to according to writing time, with arranged sequentially according to writing time from writing time the latest to writing time the earliest of record content.
Described acquiring unit 601 also is used for setting up the described search key that the described searching route set up unit 605 and described receiving element 604 receive and carrying out the band retrieve data is retrieved according to described, obtains retrieve data.
Concrete, acquiring unit 601 specifically is used for, described at least one Hash keys to the situation that is stored to memory node under, described searching route and described search key are sent in the right memory node of storage Hash keys, so that described memory node is according to described searching route and described search key, described described data to be tested of not resolving to storage are retrieved, and return retrieve data.Receive the retrieve data that described memory node returns.
The embodiment of the invention provides the device of a kind of searching route storage, and by data to be tested are resolved, the critical data that parses according to the critical data that parses, is obtained Hash keys pair, and stores described Hash keys pair.Like this, each Hash keys of storage has reduced redundant information to only having two elements, thereby has realized reducing the waste of storage space, has improved the utilization factor of storage space.After receiving the search key and search key type of user input, according to the search key type, set up searching route, and according to the search key of this searching route and user's input, obtain the required retrieve data of user, and then feed back to the user.Improve inquiry velocity, thereby improved user's experience.
The embodiment of the invention provides a kind of device of searching route storage, as shown in Figure 9, comprising: storer 801 and the processor 802 that is connected with storer 801.Certainly, the device of searching route storage can also comprise the universal components such as antenna, Base-Band Processing parts, middle radio frequency processing parts, input-output unit, and the embodiment of the invention is in this no longer any restriction.
Wherein, storage batch processing code in the storer 801, processor 802 is used for calling the program code of storer 801, is used for carrying out following operation:
Processor 802 is used for data to be retrieved are resolved, and obtains at least one critical data.
Wherein, described critical data is for the data that make up searching route.
Need to prove, when searching route refers to retrieve according to the retrieval critical data that receives, employed path.
Concrete, described processor 802 specifically is used for, and data to be retrieved are resolved, and obtaining version is the critical data of tree type.
Processor 802 also is used for according to described at least one critical data, generates at least one Hash keys pair.
Wherein, searching route by at least one described Hash keys to forming.Described Hash keys is to comprising: the first element and the second element; The upper level element that described the second element is described the first element.The first element is a critical data, and the second element is the upper level data of this critical data.
Concrete, described processor 802 specifically is used for, and is the critical data of tree type according to described version, generates at least one Hash keys pair.
This moment, the first right element of described Hash keys was a node in the critical data of tree; The second element that described Hash keys is right is the father node of described the first element.
Storer 801 is used for storing described at least one Hash keys that described processor 802 obtains pair.
Concrete, described storer 801 specifically is used for, and according to default hash algorithm, obtains described at least one Hash keys to the cryptographic hash of correspondence.According to the cryptographic hash of described at least one Hash keys to correspondence, with described at least one Hash keys pair, be stored to described at least one Hash keys in memory node corresponding to the cryptographic hash of correspondence.
Described storer 801, the described data to be tested that also are used for not resolving are stored to described memory node.
Further, the device of above-mentioned searching route storage with reference to shown in Figure 9, also comprises: receiver 803.Wherein, described receiver 803 links to each other with processor 802 respectively.
Receiver 803 is used for receiving search key and search key type.
Described processor 802 also is used for the described search key type according to described receiver 804 receptions, obtains the cryptographic hash of described search key type.
Described processor 802 also is used for the cryptographic hash according to the described search key type of obtaining, and obtains the first Hash keys pair.
Wherein, described the first Hash keys Hash keys that the Hash lookup that refers to according to the search key type is arrived pair.
Concrete, described processor 802 specifically is used for, and according to the cryptographic hash of the described search key type of obtaining, obtains cryptographic hash corresponding to memory location first Hash keys identical with the cryptographic hash of described search key type pair.The first element that described the first Hash keys of cycle index is right, and obtain the cryptographic hash of the second right element of described the first Hash keys.According to the cryptographic hash of the second right element of described described the first Hash keys of obtaining, obtain the second identical Hash keys of the cryptographic hash of the second right element of cryptographic hash corresponding to memory location and described the first Hash keys pair; The first element that described the second Hash keys is right refers to the second element that described the first Hash keys is right.According to the identical Hash keys of the cryptographic hash of the second right element of cryptographic hash corresponding to described memory location and described the first Hash keys pair, upgrade described the first Hash keys pair, until the second Hash keys of obtaining is to for empty; Record the second right element of the first Hash keys.
Processor 802 also is used for setting up searching route according to described the first Hash keys pair.
Concrete, described processor 802 specifically is used for, first element right according at least one first Hash keys of described record, and according to writing time, backward is set up searching route.
Wherein, backward is set up and to be referred to according to writing time, with arranged sequentially according to writing time from writing time the latest to writing time the earliest of record content.
Described processor 802 also is used for carrying out the band retrieve data is retrieved according to the described search key of described searching route and 604 receptions of described receiving element, obtains retrieve data.
Concrete, processor 802 specifically is used for, described at least one Hash keys to the situation that is stored to memory node under, described searching route and described search key are sent in the right memory node of storage Hash keys, so that described memory node is according to described searching route and described search key, described described data to be tested of not resolving to storage are retrieved, and return retrieve data.Receive the retrieve data that described memory node returns.
The embodiment of the invention provides the device of a kind of searching route storage, and by data to be tested are resolved, the critical data that parses according to the critical data that parses, is obtained Hash keys pair, and stores described Hash keys pair.Like this, each Hash keys of storage has reduced redundant information to only having two elements, thereby has realized reducing the waste of storage space, has improved the utilization factor of storage space.After receiving the search key and search key type of user input, according to the search key type, set up searching route, and according to the search key of this searching route and user's input, obtain the required retrieve data of user, and then feed back to the user.Improve inquiry velocity, thereby improved user's experience.
The embodiment of the invention provides a kind of system of searching route storage, as shown in figure 10, comprising: host node 901, switch 902, service server 903, terminal 904.Wherein, described road host node 901 is the device of the searching route storage described in above-described embodiment.
Further, the system of above-mentioned searching route storage with reference to shown in Figure 10, also comprises: memory node 905.Wherein, the described memory node 905 of described host node 901 management.
The embodiment of the invention provides method, the Apparatus and system of a kind of searching route storage, and by data to be tested are resolved, the critical data that parses according to the critical data that parses, is obtained Hash keys pair, and stores described Hash keys pair.Like this, each Hash keys of storage has reduced redundant information to only having two elements, thereby has realized reducing the waste of storage space, has improved the utilization factor of storage space.After receiving the search key and search key type of user input, according to the search key type, set up searching route, and according to the search key of this searching route and user's input, obtain the required retrieve data of user, and then feed back to the user.Improve inquiry velocity, thereby improved user's experience.
The above; be the specific embodiment of the present invention only, but protection scope of the present invention is not limited to this, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; can expect easily changing or replacing, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion by described protection domain with claim.

Claims (13)

1. the method for a searching route storage is characterized in that, comprising:
Data to be retrieved are resolved, obtain at least one critical data;
According to described at least one critical data, generate at least one Hash keys pair; Wherein, searching route by at least one described Hash keys to forming; Described Hash keys is to comprising: the first element and the second element; The upper level element that described the second element is described the first element;
Store described at least one Hash keys pair.
2. the method for searching route according to claim 1 storage is characterized in that, described data to be retrieved is resolved, and obtains at least one critical data and comprises:
Data to be retrieved are resolved, and obtaining version is the critical data of tree type;
Described according to described at least one critical data, generate at least one Hash keys to comprising:
Be the critical data of tree type according to described version, generate at least one Hash keys pair, wherein, the first element that described Hash keys is right is a node in the critical data of tree; The second element that described Hash keys is right is the father node of described the first element.
3. the method for searching route according to claim 1 and 2 storage is characterized in that described at least one Hash keys of described storage is to comprising:
According to default hash algorithm, obtain described at least one Hash keys to the cryptographic hash of correspondence;
According to the cryptographic hash of described at least one Hash keys to correspondence, with described at least one Hash keys pair, be stored to described at least one Hash keys in memory node corresponding to the cryptographic hash of correspondence.
4. each described searching route storage means is characterized in that according to claim 1-3, described at least one Hash keys of described storage to after, also comprise:
Receive search key and search key type;
According to described search key type, obtain the cryptographic hash of described search key type;
According to the cryptographic hash of the described search key type of obtaining, obtain the first Hash keys pair;
According to described the first Hash keys of obtaining pair, set up searching route;
Treat retrieve data according to described searching route and described search key and retrieve, obtain retrieve data.
5. the method for searching route according to claim 4 storage is characterized in that the cryptographic hash of the described search key type that described basis is obtained is obtained the first Hash keys to comprising:
According to the cryptographic hash of the described search key type of obtaining, obtain cryptographic hash corresponding to memory location first Hash keys identical with the cryptographic hash of described search key type pair;
The first element that described the first Hash keys of cycle index is right, and obtain the cryptographic hash of the second right element of described the first Hash keys;
According to the cryptographic hash of the second right element of described described the first Hash keys of obtaining, obtain the second identical Hash keys of the cryptographic hash of the second right element of cryptographic hash corresponding to memory location and described the first Hash keys pair; The first element that described the second Hash keys is right refers to the second element that described the first Hash keys is right;
According to described the second Hash keys to upgrading described the first Hash keys pair, until the second Hash keys of obtaining is to for empty; Record the second right element of the first Hash keys;
Described the first Hash keys that described basis is obtained pair, set up searching route and comprise:
First element and described first Hash keys right second element right according at least one first Hash keys of described record, according to writing time, backward is set up searching route.
6. according to claim 4 or the method for 5 described searching routes storage, it is characterized in that, describedly treat retrieve data according to described searching route and described search key and retrieve, obtain retrieve data and comprise:
Described at least one Hash keys to the situation that is stored to memory node under, described searching route and described search key are sent in the right memory node of storage Hash keys, so that described memory node is according to described searching route and described search key, described described data to be tested of not resolving to storage are retrieved, and return retrieve data;
Receive the retrieve data that described memory node returns.
7. the device of a searching route storage is characterized in that, comprising:
Acquiring unit is used for data to be retrieved are resolved, and obtains at least one critical data;
Generation unit is used for described at least one critical data of obtaining according to described acquiring unit, generates at least one Hash keys pair; Wherein, searching route by at least one described Hash keys to forming; Described Hash keys is to comprising: the first element and the second element; The upper level element that described the second element is described the first element;
Storage unit is used for storing described at least one Hash keys that described generation unit obtains pair.
8. device according to claim 7 is characterized in that,
Described acquiring unit specifically is used for, and data to be retrieved are resolved, and obtaining version is the critical data of tree type;
Described generation unit specifically is used for, and the described version of obtaining according to described acquiring unit is the critical data of tree type, generates at least one Hash keys pair, and wherein, the first element that described Hash keys is right is a node in the critical data of tree; The second element that described Hash keys is right is the father node of described the first element.
9. according to claim 7 or 8 described devices, it is characterized in that,
Described storage unit specifically is used for, and according to default hash algorithm, obtains described at least one Hash keys to the cryptographic hash of correspondence;
According to the cryptographic hash of described at least one Hash keys to correspondence, with described at least one Hash keys pair, be stored to described at least one Hash keys in memory node corresponding to the cryptographic hash of correspondence.
10. each described device is characterized in that according to claim 7-9, also comprises:
Receiving element is used for receiving search key and search key type;
Described acquiring unit also is used for the described search key type according to described receiving element reception, obtains the cryptographic hash of described search key type;
Described acquiring unit also is used for the cryptographic hash according to the described search key type of obtaining, and obtains the first Hash keys pair;
Set up the unit, be used for described the first Hash keys of obtaining according to described acquiring unit pair, set up searching route;
Described acquiring unit also is used for setting up the described search key that the described searching route set up the unit and described receiving element receive and carrying out the band retrieve data is retrieved according to described, obtains retrieve data.
11. device according to claim 10 is characterized in that,
Described acquiring unit specifically is used for, and according to the cryptographic hash of the described search key type of obtaining, obtains cryptographic hash corresponding to memory location first Hash keys identical with the cryptographic hash of described search key type pair;
The first element that described the first Hash keys of cycle index is right, and obtain the cryptographic hash of the second right element of described the first Hash keys;
According to the cryptographic hash of the second right element of described described the first Hash keys of obtaining, obtain the second identical Hash keys of the cryptographic hash of the second right element of cryptographic hash corresponding to memory location and described the first Hash keys pair; The first element that described the second Hash keys is right refers to the second element that described the first Hash keys is right;
According to the identical Hash keys of the cryptographic hash of the second right element of cryptographic hash corresponding to described memory location and described the first Hash keys pair, upgrade described the first Hash keys pair, until the second Hash keys of obtaining is to for empty; Record the second right element of the first Hash keys;
The described unit of setting up specifically is used for, first element right according at least one first Hash keys of described record, and according to writing time, backward is set up searching route.
12. according to claim 10 or 11 described devices, it is characterized in that,
Acquiring unit specifically is used for, described at least one Hash keys to the situation that is stored to memory node under, described searching route and described search key are sent in the right memory node of storage Hash keys, so that described memory node is according to described searching route and described search key, described described data to be tested of not resolving to storage are retrieved, and return retrieve data;
Receive the retrieve data that described memory node returns.
13. the system of a searching route storage is characterized in that, comprising: host node, switch, service server, terminal; Wherein, described host node is the device of each described searching route storage of claim 7-12.
CN201210584778.2A 2012-12-28 2012-12-28 Method, Apparatus and system that a kind of searching route stores Active CN103049553B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210584778.2A CN103049553B (en) 2012-12-28 2012-12-28 Method, Apparatus and system that a kind of searching route stores

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210584778.2A CN103049553B (en) 2012-12-28 2012-12-28 Method, Apparatus and system that a kind of searching route stores

Publications (2)

Publication Number Publication Date
CN103049553A true CN103049553A (en) 2013-04-17
CN103049553B CN103049553B (en) 2016-03-02

Family

ID=48062194

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210584778.2A Active CN103049553B (en) 2012-12-28 2012-12-28 Method, Apparatus and system that a kind of searching route stores

Country Status (1)

Country Link
CN (1) CN103049553B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685453A (en) * 2013-09-11 2014-03-26 华中科技大学 A method for obtaining metadata in a cloud storage system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101655871A (en) * 2009-09-25 2010-02-24 金蝶软件(中国)有限公司 Method and device for storing and inquiring data
EP2209074A1 (en) * 2009-01-19 2010-07-21 Huawei Technologies Co., Ltd. Data storage processing method, data searching method and devices thereof
CN102360359A (en) * 2011-09-29 2012-02-22 用友软件股份有限公司 Data management device and data management method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2209074A1 (en) * 2009-01-19 2010-07-21 Huawei Technologies Co., Ltd. Data storage processing method, data searching method and devices thereof
CN101655871A (en) * 2009-09-25 2010-02-24 金蝶软件(中国)有限公司 Method and device for storing and inquiring data
CN102360359A (en) * 2011-09-29 2012-02-22 用友软件股份有限公司 Data management device and data management method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685453A (en) * 2013-09-11 2014-03-26 华中科技大学 A method for obtaining metadata in a cloud storage system
CN103685453B (en) * 2013-09-11 2016-08-03 华中科技大学 The acquisition methods of metadata in a kind of cloud storage system

Also Published As

Publication number Publication date
CN103049553B (en) 2016-03-02

Similar Documents

Publication Publication Date Title
US10101937B2 (en) Apparatus and method for referencing dense and sparse information in multi-dimensional to linear address space translation
US8762353B2 (en) Elimination of duplicate objects in storage clusters
US10534753B2 (en) Caseless file lookup in a distributed file system
US10387044B2 (en) Deduplication in a distributed storage system
CN107704202B (en) Method and device for quickly reading and writing data
CN111247518A (en) Database sharding
CN107291710B (en) Method and device for updating data for distributed database system
CN111241108B (en) Key value based indexing method and device for KV system, electronic equipment and medium
CN111475105B (en) Monitoring data storage method, monitoring data storage device, monitoring data server and storage medium
CN111045985A (en) File storage processing method, server, electronic device and storage medium
CA2802458C (en) Synchronizing endpoint data stores having disparate schemas
CN103294610A (en) Reusable content addressable stores
CN110888847B (en) Recycle bin system and file recycling method
CN109739854A (en) A kind of date storage method and device
CN115422135A (en) Data processing method and device
US9529855B2 (en) Systems and methods for point of interest data ingestion
CN108845892A (en) Data processing method, device, equipment and the computer storage medium of distributed data base
CN112148728B (en) Method, apparatus and computer program product for information processing
CN112162951A (en) Information retrieval method, server and storage medium
CN103049553B (en) Method, Apparatus and system that a kind of searching route stores
US8078576B2 (en) Network management information (NMI) distribution
CN112241336A (en) Method, apparatus and computer program product for backing up data
AU2002351296B2 (en) System and method for processing a request using multiple database units
CN113761102B (en) Data processing method, device, server, system and storage medium
CN110750268A (en) File cleaning method and device, computer readable storage medium and electronic equipment

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
TR01 Transfer of patent right

Effective date of registration: 20191220

Address after: 314400 No.11, Weisan Road, Nongfa District, Chang'an Town, Haining City, Jiaxing City, Zhejiang Province

Patentee after: Haining hi tech Zone Science and Innovation Center Co.,Ltd.

Address before: 510000 unit 2414-2416, building, No. five, No. 371, Tianhe District, Guangdong, China

Patentee before: GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION Co.,Ltd.

Effective date of registration: 20191220

Address after: 510000 unit 2414-2416, building, No. five, No. 371, Tianhe District, Guangdong, China

Patentee after: GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right