CN102006317A - Method for storing and inquiring object information - Google Patents

Method for storing and inquiring object information Download PDF

Info

Publication number
CN102006317A
CN102006317A CN2010102284616A CN201010228461A CN102006317A CN 102006317 A CN102006317 A CN 102006317A CN 2010102284616 A CN2010102284616 A CN 2010102284616A CN 201010228461 A CN201010228461 A CN 201010228461A CN 102006317 A CN102006317 A CN 102006317A
Authority
CN
China
Prior art keywords
portal server
server
node
object information
information
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
CN2010102284616A
Other languages
Chinese (zh)
Other versions
CN102006317B (en
Inventor
殷丽华
方滨兴
贾焰
刘文懋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Hetian Huizhi Information Technology Co Ltd
Beijing Computer Network And Information Security Research Center Of Harbin Institute Of Technology
National University of Defense Technology
Original Assignee
Beijing Hetian Huizhi Information Technology Co Ltd
Beijing Computer Network And Information Security Research Center Of Harbin Institute Of Technology
National University of Defense Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Hetian Huizhi Information Technology Co Ltd, Beijing Computer Network And Information Security Research Center Of Harbin Institute Of Technology, National University of Defense Technology filed Critical Beijing Hetian Huizhi Information Technology Co Ltd
Priority to CN 201010228461 priority Critical patent/CN102006317B/en
Publication of CN102006317A publication Critical patent/CN102006317A/en
Application granted granted Critical
Publication of CN102006317B publication Critical patent/CN102006317B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method for storing and inquiring object information, belonging to the field of communication of the internet of things. The method for inquiring object information comprises the following steps of: acquiring an ID (Identity) of a portal server by a client, and sending an inquiry request to the portal server corresponding to the ID of the portal server; receiving the inquiry request by the portal server; inquiring the corresponding object information from a server cluster to which object ID belongs according to the ID of an object if the portal server is the portal server of a specific mechanism, and sending the object information to the client; looking up a mainframe node storing the object information of the object according to the ID of the object if the portal server is a default portal server, inquiring the object information of the object from the mainframe node, and sending the object information to the client; and receiving the object information by the client, and displaying the object information. The invention brings convenience to a user to inquire the object information.

Description

The method of a kind of storage and inquiry object information
Technical field
The present invention relates to the Internet of Things communications field, the method for particularly a kind of storage and inquiry object information.
Background technology
Internet of Things is the Internet of information age and traditional object to be combined and the network that forms, the information that in Internet of Things, can store each object, and the user can search own needed object information from Internet of Things.
Internet of Things is made up of the enterprise network of different institutions, and each object in the Internet of Things is under the jurisdiction of different mechanisms, the information that each mechanism will belong to the object of this mechanism leaves in the memory space of own enterprise network, if the user need inquire about the information of certain object, then at first login the server of this object institutional affiliation, and submit the request of the information of this object of inquiry to this server, this server receives request, and, the information of the object of inquiry is returned to the user from the information of this object of Internet of Things inquiry.
In realizing process of the present invention, the inventor finds that there is following problem at least in prior art:
Be under the jurisdiction of different mechanisms respectively if the user need inquire about information and these objects of a plurality of objects, then the user need login the server of each mechanism respectively, therefore makes troubles to the user.
Summary of the invention
In order to make things convenient for the user inquiring object information, the invention provides the method for a kind of storage and inquiry object information.Described technical scheme is as follows:
A kind of method of storing object information is characterized in that, described method comprises:
Reader is gathered object information, and described object information comprises the ID (Identification, sign) and the positional information of object at least;
Described reader obtains the ID of portal server, sends the portal server of storage request to the ID correspondence of described portal server, and described object information is carried in described storage request;
Described portal server receives described storage request, if described portal server is the portal server of particular organization, then in DHT (Distributed Hash Table, distributed hashtable) network, described object information is stored in its subordinate server cluster;
If described portal server is then chosen host node for the portal server of acquiescence from described DHT network, described object information is stored in the described host node.
Described reader obtains the ID of portal server, specifically comprises:
Described reader sends first search request to the type resolution server, and described first search request is carried the ID of described object;
Described type resolution server receives described first search request, and the object type according to the ID of described object obtains described object sends to described reader with described object type;
Described reader receives described object type, obtain ONS (Object NameService according to described object type, the object name analysis service) ID of server, ONS server to the ID of described ONS server correspondence sends second search request, and described second search request is carried the ID of described object;
Described ONS server receives described second search request, according to the ID of described object, obtains the ID of portal server, and the ID of described portal server is sent to described reader;
Described reader receives the ID of described portal server.
Described type resolution server specifically comprises according to the object type that the ID of described object obtains described object:
Described type resolution server is determined the coding rule of the ID of described object; According to described coding rule, from the corresponding relation of the coding rule stored and object type, search corresponding object type.
Described reader obtains the ID of ONS server according to described object type, specifically comprises:
Described reader is according to described object type, searches the ID of corresponding ONS server from the corresponding relation of the object type stored and the ID of ONS server.
Described ONS server obtains the ID of portal server according to the ID of described object, specifically comprises:
Described ONS server is according to the ID of described object, searches the ID of corresponding portal server from the corresponding relation of the ID of the object stored and the ID of portal server.
If described portal server is then chosen host node for the portal server of acquiescence, described object information is stored in the described host node, specifically comprise:
Described portal server calculates hashed value by hash function to the ID of described object, chooses host node according to described hashed value from described DHT network, with the information stores of described object in described host node.
Described be stored in described object information in the described host node after, also comprise:
Described portal server is transmitted to described storage request the root super node of awl network layer framework;
Described super node receives described storage request, in described awl network layer framework, determines the Minimum Area at described object place according to the positional information of described object, described storage request is transmitted to the super node in described zone;
Described super node receives described storage request, and described storage request is transmitted to ordinary node in the described zone;
Described ordinary node receives described storage request, stores the object ID that described storage request is carried.
Described object information also comprises thingness, correspondingly,
After described ordinary node receives described storage request, also store the thingness that described storage request is carried.
A kind of method that the object information of above-mentioned storage is inquired about, described method comprises:
Client is obtained the ID of portal server, sends the portal server of query requests to the ID correspondence of described portal server, and described query requests comprises the ID of object at least;
Described portal server receives described query requests, if described portal server is the portal server of particular organization, then inquires about corresponding object information according to described object ID from its subordinate server cluster, and described object information is sent to described user side;
If described portal server is the portal server of acquiescence, then according to the ID of described object, search the host node of the object information of the described object of storage, the object information of the described object of inquiry sends to described user side with described object information from described host node;
Described user side receives described object information, and shows described object information.
Described client is obtained the ID of portal server, specifically comprises:
Described client sends the 3rd to the type resolution server and searches request, and the ID of described object is carried in the described the 3rd request of searching;
Described type resolution server receives the described the 3rd and searches request, and the object type according to the ID of described object obtains described object sends to described client with described object type;
Described client receives described object type, obtains the ID of ONS server according to described object type, sends the 4th search request to the ONS server of the ID of described ONS server correspondence, and described the 4th search request is carried the ID of described object;
Described ONS server receives described the 4th search request, according to the ID of described object, obtains the ID of portal server, and the ID of described portal server is sent to described client;
Described client receives the ID of described portal server.
Described portal server is searched the host node of the object information of the described object of storage according to the ID of described object, specifically comprises:
Described portal server is by hash function, and the ID of described object is calculated hashed value, according to described hashed value, searches the host node of the object information of the described object of storage from the DHT network.
A kind of method that the object information of above-mentioned storage is inquired about, described method comprises:
Client sends query requests, and described query requests is carried the query context and the thingness of user's appointment;
Portal server receives described query requests, if described portal server is the portal server of particular organization, then inquiry thingness is the object information of described thingness the server cluster under it, and described object information is sent to described client;
If described portal server is the portal server of acquiescence, then obtain the object ID that satisfies described thingness from awl level of net framework, according to described object ID, obtain host node, the object information of the described object ID correspondence of inquiry sends to client with described object information from described host node;
Described client receives described object information, shows described object information.
Described portal server obtains the object ID that satisfies described thingness from awl level of net framework, specifically comprises:
Described portal server sends the root super node of described query requests to described awl level of net framework;
Described super node receives described query requests, determines to comprise the zone of described query context, described query requests sent to the ordinary node in described zone;
Described ordinary node receives described query requests, according to described thingness, searches corresponding object ID from the corresponding relation of the object ID that stored and thingness, and described object ID is sent to described super node;
Described super node receives described object ID, and transmits described object ID and give described portal server;
Described portal server receives described object ID.
Gather object information by data reader, ID according to object determines portal server, in the DHT network of this portal server with the information stores of object, the user will inquire about the ID of object to the client input, client is obtained portal server according to the ID of object, and the query requests of carrying object ID is sent to portal server, and portal server receives query requests, store the node of the information of this object from the DHT NetFind, the information of inquiry object from the node of searching.Wherein since with the information stores of the object of different institutions in same platform DHT network, thereby, the user only need import object ID to client, just can inquire about the object information of different institutions, and does not need to login the server of different institutions, make things convenient for the user, improved user experience.
Description of drawings
Fig. 1 is the Internet of Things level configuration diagram that the embodiment of the invention is used;
Fig. 2 is the awl level of net configuration diagram that the embodiment of the invention provides;
Fig. 3 is that the node N that the embodiment of the invention provides adds the flow chart of boring the level of net framework;
Fig. 4 is that node N that the embodiment of the invention provides upgrades awl level of net framework flow chart when withdrawing from;
Fig. 5 is that node N that the embodiment of the invention provides upgrades awl level of net framework flow chart when normally withdrawing from;
Fig. 6 is that node N that the embodiment of the invention provides upgrades awl level of net framework flow chart when withdrawing from unusually;
Fig. 7 is a kind of method flow diagram of storing object information that the embodiment of the invention 1 provides;
Fig. 8 is a kind of method flow diagram of storing object information that the embodiment of the invention 2 provides;
Fig. 9 is a kind of method flow diagram of inquiring about object information that the embodiment of the invention 3 provides;
Figure 10 is a kind of method flow diagram of inquiring about object information that the embodiment of the invention 4 provides;
Figure 11 is a kind of method flow diagram of inquiring about object information that the embodiment of the invention 5 provides.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
In embodiments of the present invention, for larger mechanism, this mechanism is the fail safe of focused data relatively, usually in Internet of Things for a server cluster is set oneself, the information of one's own object is left in the server cluster into oneself setting with the form of cloud.Wherein, server cluster is made up of a plurality of servers, and each server cluster all has a portal server.For any one server cluster, the portal server in this server cluster can be inquired about and operation such as storage each server in this server cluster.
For the less mechanism of scale, this mechanism is the availability of focused data relatively, security requirement to data is not high, the object information of wishing one's own object can reliable access, therefore, the object information that belongs to the object of this mechanism can be stored in memory space opening, extendible and safe in the Internet of Things.
Be illustrated in figure 1 as the Internet of Things framework that the present invention uses, this framework is made up of DHT network and awl level of net framework, and wherein, the P2P network that the DHT network is made up of plurality of nodes, each node can be server cluster or host node etc.
For the great institutions that has server cluster, server cluster is placed in the DHT network as a node, this great institutions can be stored in the object information that belongs to the object of this mechanism in this server cluster.For the mechanism that does not have server cluster, the information that belongs to the object of this mechanism can be left in the host node on the DHT network, host node is memory space opening, extendible and safe in the Internet of Things.Wherein, the portal server of acquiescence is set also in the DHT network, the portal server of this acquiescence can be inquired about and operation such as storage the All hosts node.
Wherein, in embodiments of the present invention, the object information of the object of different institutions all is stored in the node of DHT network, thereby the DHT network provides a unified storage platform for the object information of each mechanism.
Wherein, the total m layer of awl level of net framework, in top layer is the zone of ground floor, divide n*n regional, the value of m and n all is a integer more than or equal to 2 by the prior setting of operator and m and n, from each zone, elect performance node preferably, this node is set to super node, other node is as ordinary node, from each zone of ground floor, select a super node, and with this super node definition root super node, the wherein ID of each the regional super node in the root super node storage ground floor.The zone at its place is in charge of and is safeguarded to the regional super node of in the ground floor each, for any one zone in the ground floor, for convenience of explanation this zone is called regional A, the ID of the super node in the interstitial content in ID, the regional A of each ordinary node in the super node storage area A of regional A and each neighbours zone of object number and regional A.Wherein, if certain zone does not have node, then maintenance and management can be responsible for by other regional super nodes in this zone.
For any one zone in the ground floor, this zone can also be divided into the n*n sub regions, obtains the subregion of the second layer, and this zone is the father zone of each subregion.Suppose regional A is divided into the n*n sub regions, wherein, the super node of regional A is father's super node of each subregion of division, super node of election from the node of each subregion, correspondingly, the super node of regional A is also stored the ID of the super node of each subregion.In addition, the ID of storage his father super node is the super node of regional A, the ID of each ordinary node in the subregion in the super node of each subregion of zone A, the ID of the super node in the interstitial content in the subregion and the neighbours zone of object number and subregion.
Wherein, subregion in the second layer can also be divided the n*n sub regions, obtain the 3rd layer subregion, in the 3rd layer, if there is node in the subregion, and selecting super node the node in this subregion, correspondingly, the father's super node that is arranged in this subregion of the second layer also stores the ID of the super node of this subregion.
Wherein, whole awl net can be divided the m layer, for any one zone of m layer, and the ID of storage his father super node in this regional super node, interstitial content in the ID of the ordinary node that this is regional, this zone and object number.
For example, for awl level of net framework as shown in Figure 2, this awl level of net framework is divided into 3 layers.The area dividing 2*2 of ground floor zone, be respectively A1, A2, A3 and A4, wherein, the selecting super node is respectively S1, S2, S3 and S4 from regional A1, A2, A3 and A4, selecting super node S1 is as the root super node from four super node S1, S2, S3 and S4 of ground floor, and each super node of storage ground floor is the ID of S1, S2, S3 and S4 in root super node S1.To any one the regional super node in the ground floor, super node S1 for example, the zone at super node S1 place is A1, the super node in interstitial content in the ID of each ordinary node in super node S1 in the storage area A1, regional A1 and the neighbours zone of object number and regional A1 is the ID of super node S2, S3 and S4.
For any one zone in the ground floor, for example regional A1, regional A1 is divided into the 2*2 sub regions to be obtained second layer subregion and is respectively B11, B12, B13 and B14, wherein, zone A1 and super node S1 are respectively subregion B11, B12, B13 and B14 father zone and father's super node, difference selecting super node t11, t12, t13 and t14 from subregion B11, B12, B13 and B14, correspondingly, also store the ID of super node t11, t12, t13 and the t14 of each subregion among the super node S1 of regional A1.
For any one zone in the second layer, for example for the area B in the second layer 11, the super node t11 of area B 11, the ID of storage father super node S1 in super node t11, the ID of each ordinary node in the area B 11, the interstitial content in the area B 11 and super node t12, the t13 in the neighbours zone of object number and area B 11 and the ID of t14.
Can be divided into the 2*2 sub regions for area B 11, obtain the 3rd layer region and be respectively C11, C12, C13 and C14, the selecting super node is respectively q11, q12, q13 and q14 from zone C 11, C12, C13 and C14.Correspondingly, also store the ID of super node q11, q12, q13 and the q14 of subregion among the super node t11 of area B 11.Any one zone to the 3rd layer, for example zone C 11, super node q12, the q13 in the neighbours zone of the number of the number of the ID of the ID of storage father super node t11, each ordinary node in the zone C 11, the node in the zone C 11 and object and zone C 11 and the ID of q14 among the super node q11 of zone C 11.
Wherein, in awl level of net framework, exist node to add the situation of awl level of net framework, also exist node to withdraw from the situation of awl level of net framework.
Wherein,, when node N joins in the awl level of net framework in as shown in Figure 1 the Internet of Things framework, can node N be joined in the awl level of net framework, comprise by following step 101-110 referring to Fig. 3:
Step 101: when having node N to add in the awl level of net framework in the Internet of Things, node N sends and joins request to root super node S1;
Step 102: root super node S1 scans each zone in the ground floor, searches the zone of load maximum, is transmitted to this regional super node with joining request;
Wherein, each regional load is the object number in this zone and the ratio of interstitial content, when root super node S1 scans certain zone of ground floor, this regional super node calculates this regional load and returns to the root super node according to interstitial content and the object number self stored.
Step 103: this super node receives and joins request, and judges whether this zone has subregion, if having, then execution in step 104, if do not have, then execution in step 105;
Step 104: this super node scans each subregion in this zone, searches the subregion of load maximum, is transmitted to the super node in the zone of searching with joining request, and returns execution in step 103;
Wherein, when this super node scanned each subregion in this zone, the super node of each subregion calculated load and returns to this super node according to the interstitial content and the object number of storage.
Step 105: this super node judges whether this zone is positioned at the bottom, if then execution in step 106, if not, then execution in step 107;
Step 106: this super node is added to the ordinary node in this zone with node N, and the ID of cache node N increases interstitial content, and successively upwards notifies father's super node simultaneously;
Wherein, after father's super node of every layer receives this notice, increase the interstitial content of self storing.
Step 107: this super node is judged the number in the zone that oneself is responsible for, if be one, then execution in step 108; If be a plurality of, then execution in step 109;
Step 108: this super node is with this area dividing n*n sub regions;
Step 109: this super node is given node N with the region allocation of half, and with node N half regional super node as this distribution, notifies the father super node;
Step 110: father's super node is notified the super node in this regional neighbours zone, the sign of memory node N behind the neighbor node reception notification.
Further, father's super node increases the interstitial content that self stores.
Wherein, when the ordinary node N in the awl stratum reticulare framework withdraws from awl level of net framework, need upgrade whole awl level of net framework.Wherein, ordinary node N may normally withdraw from awl level of net framework, also may withdraw from awl level of net framework unusually.
Referring to Fig. 4, when ordinary node N withdraws from awl level of net framework, can upgrade awl level of net framework by following step 201-203, comprising:
Step 201: the super node R of ordinary node N region is known when ordinary node N withdraws from, the ID of the node N of deletion buffer memory, and reduce the interstitial content of storing;
Wherein, this super node R can press mode knows withdrawing from of ordinary node N, comprising:
The first, ordinary node N sends and to withdraw from request to this super node R, after this super node R receives this and withdraws from request, knows that ordinary node N withdraws from.
Wherein, when ordinary node N normally withdrawed from, ordinary node N sent and withdraws from request to this super node R.
The second, this super node R is every one-period each ordinary node broadcast query request to the region, after each ordinary node in this zone receives query requests, reply response message to this super node R, if ordinary node N does not reply response message, then this super node R knows that node N withdraws from.
Wherein, when ordinary node N withdrawed from unusually, ordinary node N can not reply response message to super node R.
If the neighbor node of the 3rd ordinary node N does not receive the heartbeat message that ordinary node N sends in the default time, then send the super node R that is notified to the region, this notice is used to inform that this super node R ordinary node N exits network.
Wherein, each ordinary node periodically sends heartbeat message to its neighbor node.When ordinary node N withdrawed from unusually, ordinary node N can not send heartbeat message to its neighbor node.
Step 202: this super node R upwards successively notifies father's super node;
Step 203: after every layer of father's super node receives this notice, reduce the interstitial content of self storing.
Wherein, when the super node N in the awl stratum reticulare framework withdraws from awl level of net framework, need upgrade whole awl level of net framework.Wherein, super node N may normally withdraw from awl level of net framework, also may withdraw from awl level of net framework unusually.
Referring to Fig. 5, when super node N normally withdrawed from, 301-306 upgraded awl stratum reticulare framework as follows, comprising:
Step 301: super node N elects a candidate super node Nx by existing election algorithm in each ordinary node of its region;
Step 302: super node N sends and withdraws from request to his father's super node R, and this withdraws from the ID that carries candidate super node Nx in the request;
Wherein, super node N send the request of withdrawing to father's super node Nx after, just can withdraw from and bore the level of net framework.
Step 303: father's super node R receives and to withdraw from request, and candidate super node Nx is arranged to this regional super node, sends the super node in each neighbours zone in each ordinary node of being notified to this zone, this zone;
Wherein, each ordinary node in this zone is updated to the ID that self stores super node N the ID of candidate super node Nx.After the super node in each neighbours zone in this zone receives this notice, the ID of super node N of self storage is updated to the ID of candidate super node Nx.
Step 304: father's super node R is updated to the ID of candidate super node Nx with the ID of super node N of storage, reduces the number of the node of storage;
Step 305: father's super node R successively upwards notifies each father's super node, wherein, after father's super node of every layer receives this notice, reduces the interstitial content of self storing;
Step 306: candidate super node Nx obtains and stores the ID of each ordinary node in the region, the ID of father's super node R, the ID of the super node of each subregion of region, the ID of the super node in each neighbours zone of the interstitial content of region and object number and region.
Referring to Fig. 6, when super node N withdrawed from unusually, 401-406 upgraded awl stratum reticulare framework as follows, comprising:
Step 401: the ordinary node Nx of super node N region finds that super node N withdraws from unusually, elects candidate super node N1 by election algorithm from each ordinary node in this zone;
Wherein, when ordinary node Nx was connected with super node N, if there is not successful connection, then ordinary node Nx found that super node N withdraws from unusually.
Step 402: ordinary node Nx sends and is notified to this regional father's super node R, and this notice is carried the ID of candidate super node N1;
Step 403: father's super node R reception notification, and candidate super node N1 is arranged to this regional super node sends the super node in each neighbours zone in each ordinary node of being notified to this zone, this zone;
Wherein, each ordinary node in this zone is updated to the ID of super node N of self storage the ID of candidate super node N1.After the super node in each neighbours zone in this zone receives this notice, the ID of super node N of self storage is updated to the ID of candidate super node N1.
Step 404: father's super node R reduces the interstitial content of storing with the ID that the ID of the super node N of storage is updated to candidate super node N1;
Step 405: father's super node R successively upwards notifies each father's super node, wherein, after father's super node of every layer receives this notice, reduces the interstitial content of storage;
Step 406: candidate super node Nx obtains and stores the ID of each ordinary node in the region, the ID of father's super node R, the ID of the super node of each subregion of region, the ID of the super node in each neighbours zone of the interstitial content of region and object number and region.
Embodiment 1
As shown in Figure 7, the embodiment of the invention provides a kind of method of storing object information, comprising:
Step 501: reader is gathered object information, and wherein, object information comprises the ID and the positional information of object at least;
Step 502: reader obtains the ID of portal server, sends the portal server of storage request to the ID correspondence of portal server, and wherein, object information is carried in this storage request;
Step 503: portal server receives the storage request, if portal server is the portal server of particular organization, then in the DHT network object information is stored in its subordinate server cluster;
Step 504:, object information is stored in the host node if portal server is then chosen host node for the acquiescence portal server from the DHT network.
In embodiments of the present invention, data reader is gathered object information, determines portal server according to the ID of object, in the DHT network of this portal server with the information stores of object.Wherein, with the object information of mechanism not all storage and uniform in same platform, promptly be stored in the node of DHT network, so, when the inquiry object information, can from this DHT network, inquire about the object information of the object of different institutions.
Embodiment 2
As shown in Figure 8, the embodiment of the invention provides a kind of method of storing object information, comprising:
Step 601: reader is gathered the object information of certain object, and wherein, this object information comprises the positional information of the ID and the object of object at least;
Further, the object information of reader collection can also comprise thingness.
Step 602: reader sends first search request to the type resolution server, and this first search request is carried the ID of object;
Wherein, the ID of each object encodes according to certain coding rule.And the type resolution server stores the corresponding relation of coding rule and object type.The corresponding relation of coding rule as shown in table 1 and object type.
Table 1
Coding rule Object type
^([0-9a-fA-F]{2})(([∧s:-][0-9a-fA-F]{2}){5})$ MAC
^[0-9]{13}$ EAN_13
^(13[0-9]|15[0|3|6|7|8|9]|18[8|9])\d{8}$ CellPhoneNum
^([\da-f]{1,4}:){7}[\da-f]{1,4}$ IPV6
...... ......
Wherein, each mechanism is according to the type of object, and employing corresponding codes rule is encoded to the ID of this object.
Step 603: the type resolution server receives first search request, determines the coding rule of the object ID that first search request is carried, obtains the object type of this coding rule correspondence, and the object type that obtains is sent to reader;
Particularly, the type resolution server receives first search request, from first search request, extract the ID of object, determine the coding rule of this object ID, according to the coding rule of determining, from the corresponding relation of coding regulation and object type, search corresponding object type, the object type of searching is sent to reader.
Step 604: reader receives object type, from the corresponding relation of the object type of self storage and the ID of ONS server, searches the ID of the ONS server of correspondence;
Wherein, operator is provided with the corresponding relation of the ID of object type and ONS server in advance in each reader.For the mechanism that has server cluster, the object information that this mechanism will belong to the object of this mechanism usually is stored in its server cluster that has, and oneself portal server is arranged in the server cluster of this mechanism, this mechanism is when Internet of Things is placed object, determine the ONS server of the object type correspondence of this object, the ID of the ID of this object and this portal server is stored in the corresponding relation of ID of the ID of the object in this ONS server and portal server.
Wherein, for the mechanism that does not have server cluster, the object information that this mechanism will belong to the object of this mechanism usually is stored in the host node of Internet of Things, host node is inquired about and operation such as storage by the acquiescence portal server, therefore this mechanism is when Internet of Things is placed object, determine the ONS server of the object type correspondence of this object, the ID of the portal server of the ID of this object and acquiescence is stored in the corresponding relation of ID of the ID of the object in this ONS server and portal server.
Step 605: reader sends the ONS server of second search request to correspondence according to the ID of the ONS server of searching, and wherein, this second search request is carried the ID of this object;
Step 606:ONS server receives second search request, obtains the ID of portal server of the ID correspondence of the object that second search request carries, and the ID that sends the portal server that obtains is to reader;
Particularly, the ONS server receives second search request, from second search request, extract the ID of object, ID according to object, from the corresponding relation of the ID of the object stored and the ID of portal server, search the ID of corresponding portal server, the ID of the portal server searched is sent to reader.
Step 607: reader receives the ID of portal server, according to the ID of the portal server that receives, sends the portal server of storage request to correspondence, and wherein, object information is carried in this storage request;
Step 608: this portal server receives the storage request, if this portal server is the portal server of particular organization, then the information with object sends to server cluster, stores this object information by server cluster;
Wherein, the portal server of particular organization is the portal server in the server cluster.If this portal server is the portal server of particular organization, execute this step after, end operation; If this portal server is the portal server of acquiescence, after then this portal server receives the storage request, also continue execution in step 609-614.
Step 609:, then utilize hash function to calculate the ID hashed value of this object, according to calculating the host node of hashed value from DHT NetFind correspondence if this portal server is the acquiescence portal server;
Wherein, the sign of each host node in the DHT network can be hashed value, also can be the value that hashed value obtains through conversion.
Step 610: in portal server information stores this host node in the DHT network with this object; The request of will storing again is transmitted to the root super node of awl level of net framework;
Step 611: the root super node receives the storage request, according to the positional information of object, determines the zone in the ground floor of object place; The storage request is transmitted to this regional super node;
Wherein, each zone in the awl level of net framework all is the rectangular area, for any one zone, and can be with the position and the size in a pair of coordinate representation zone to angle point in this zone.So, just can determine the zone at object place in the positional information of root super node according to object.
Step 612: this super node receives the storage request, judges whether this zone also has subregion, if having, then execution in step 613, if do not have, then execution in step 614;
Step 613: the positional information of the object that this super node carries according to storage request, determine the subregion at object place, will the storage request be transmitted to the super node in definite zone, execution in step 611;
Step 614: this super node is selected an ordinary node from this regional ordinary node, and the ID of this object is stored in this ordinary node.
Further, if object information also comprises thingness, then ID and the thingness with this object is stored in this ordinary node simultaneously.
In embodiments of the present invention, data reader is gathered object information, determines portal server according to the ID of object, in the DHT network of this portal server with the information stores of object.Wherein, with the object information of different institutions all storage and uniform in same platform, promptly be stored in the node of DHT network, so, when the inquiry object information, can from this DHT network, inquire about the object information of the object of different institutions.
Embodiment 3
As shown in Figure 9, the method that the embodiment of the invention provides a kind of object information of embodiment 1 storage to inquire about comprises:
Step 701: client is obtained the ID of portal server, sends the portal server of query requests to the ID correspondence of portal server, and query requests comprises the ID of object at least;
Step 702: portal server receives query requests, if portal server is the portal server of particular organization, then inquires about corresponding object information according to object ID from its subordinate server cluster, and object information is sent to user side;
Step 703: if portal server for the acquiescence portal server, then according to the ID of object, is searched the host node of the object information of storage object, the object information of inquiry object sends to user side with object information from host node;
Step 704: user side receives object information, and shows object information.
In embodiments of the present invention, the user will inquire about the ID of object to the client input, client is obtained portal server according to the ID of object, to carry object ID query requests and send to portal server, portal server receives query requests, store the node of the information of this object from the DHT NetFind, the information of inquiry object from the node of searching.Because in same platform DHT network, thereby the user only need import object ID to client, and does not need to login the server of different institutions, makes things convenient for the user, has improved user experience with the information stores of the object of different institutions.
Embodiment 4
As shown in figure 10, the embodiment of the invention provides a kind of method that the object information of embodiment 2 storages is inquired about, and comprising:
Step 801: client sends the 3rd and searches request to the type resolution server, and wherein, the object ID of user's input is carried in the 3rd request of searching;
Wherein, the user imports the ID that needs the inquiry object in advance in client, and the client regeneration carries the 3rd of this object ID and searches request.
Step 802: the type resolution server receives the 3rd and searches request, according to the object ID that the 3rd request of searching is carried, obtains the object type of this object, and the object type that transmission is obtained is to client;
Particularly, the type resolution server receives the 3rd and searches request, search extraction object ID the request from the 3rd, determine the coding rule of the object ID of extraction, according to the coding rule of determining, from the corresponding relation of the coding rule stored and object type, search corresponding object type, the object type of searching is sent to client.
Step 803: client receives object type, searches the ID of corresponding ONS server from the corresponding relation of the object type stored and the ID of ONS server according to object type;
Wherein, operator stores the corresponding relation of the ID of object type and ONS server in advance in client.
Step 804: client sends the ONS server of the 4th search request to correspondence according to the ID of the ONS server of searching, and wherein, the 4th search request is carried object ID;
Step 805:ONS server receives the 4th search request, obtains the ID of the portal server of the object ID correspondence that the 4th search request carries, and the ID that sends portal server is to client;
Particularly, the ONS server receives the 4th search request, from the 4th search request, extract object ID, according to the object ID that extracts, from the corresponding relation of the object ID that stored and the ID of portal server, search corresponding portal server ID, the ID of the portal server searched is sent to client.
Step 806: client receives the ID of portal server, according to the ID of this portal server, sends the portal server of query requests to correspondence, and wherein, this query requests is carried object ID;
Step 807: portal server receives query requests;
Step 808: if this portal server is the acquiescence portal server, then the object ID that carries according to query requests of this portal server calculates corresponding hashed value by hash function;
Wherein, if this portal server is the portal server of particular organization, then this portal server is inquired about the object information of the object ID correspondence that query requests carries from the server cluster of institutional affiliation; The object information of inquiry is sent to client, execution in step 810.
Step 809: this portal server is searched corresponding host node according to the hashed value that calculates from the DHT network, the object information of the object ID correspondence that the inquiry query requests is carried from this main frame; The object information of inquiry is sent to client;
Step 810: client receives object information, and the object information that receives is shown to the user.
In embodiments of the present invention, the user will inquire about the ID of object to the client input, client is obtained object type according to the ID of object from the type resolution server, the portal server of this object type correspondence, to carry object ID query requests and send to portal server, portal server receives query requests, stores the node of the information of this object from the DHT NetFind, the information of inquiry object from the node of searching.Because in same platform DHT network, thereby the user only need import object ID to client, and does not need to login the server of different institutions, makes things convenient for the user, has improved user experience with the information stores of the object of different institutions.
Embodiment 5
As shown in figure 11, the embodiment of the invention provides a kind of method that the object information of embodiment 2 storages is inquired about, and comprising:
Step 901: client sends query requests to portal server, and wherein, this query requests is carried the query context and the thingness of user's appointment;
Wherein, the user is to client input inquiry scope and thingness and specify portal server, and client generates the query requests of carrying query context and thingness then.
Step 902: portal server receives this query requests;
Step 903: if this portal server is the acquiescence portal server, then this portal server is transmitted the root super node that this query requests is given awl level of net framework;
Wherein, if this portal server is the portal server of particular organization, then this portal server is inquired about the object information that thingness is the thingness that carries of query requests from the subordinate server cluster, and the information of the object of inquiry is sent to client, execution in step 914.
Step 904: the root super node receives this query requests, and the zone of the query context of determining to comprise that query requests is carried in the ground floor zone is transmitted to each definite regional super node with this query requests;
Step 906: each regional super node receives query requests, judges whether its region also has subregion, if having, then execution in step 907, if do not have, then execution in step 908;
Step 907: each regional super node determines to comprise the subregion of query context from each regional subregion, and query requests is transmitted to the super node in definite zone, returns execution in step 906;
Step 908: each regional super node is broadcast to query requests each ordinary node of its region;
Step 909: each ordinary node receives query requests, and getattr is the ID of the object of the thingness that carries of query requests, and the ID that sends the object that obtains sends to the super node of region;
Step 910: each super node receives the object ID that the ordinary node in its region sends, and object ID is sent to the root super node;
Step 911: the root super node receives each object ID, and the object ID that receives is transmitted to the portal server of acquiescence;
Step 912: the portal server of acquiescence receives each object ID, calculates the hashed value of each object ID correspondence by hash function;
Step 913: the portal server of acquiescence is according to the hashed value of each object, and the information of inquiry object in the main frame of the correspondence from the DHT network sends to client with the information of the object of inquiry;
Step 914: client receives the information of every object, and shows the information of every object one by one.
In embodiments of the present invention, thingness and query context and appointment portal server that the user will inquire about to the client input, the query requests that client will be carried thingness and query context sends to portal server, portal server receives query requests and is transmitted to the root super node, the root super node is determined the zone that comprises query context in each zone from the awl level of net framework of DHT network, search the ID of the object that satisfies the thingness that query requests carries the ordinary node in the zone of determining, portal server obtains the information of object again from the DHT network according to the object ID that searches.Wherein, can be according to the query context of user's input and the portal server of thingness and appointment, the information of the object of object type and thingness is satisfied in inquiry in query context, thereby realizes fuzzy query; Since with the information stores of the object of different institutions in same platform DHT network, thereby the user only need import the attribute of object and the portal server of query context and appointment to client, and does not need to login the server of different institutions, make things convenient for the user, improved user experience.
All or part of content in the technical scheme that above embodiment provides can realize that its software program is stored in the storage medium that can read by software programming, storage medium for example: the hard disk in the computer, CD or floppy disk.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (13)

1. a method of storing object information is characterized in that, described method comprises:
Reader is gathered object information, and described object information comprises the sign ID and the positional information of object at least;
Described reader obtains the ID of portal server, sends the portal server of storage request to the ID correspondence of described portal server, and described object information is carried in described storage request;
Described portal server receives described storage request, if described portal server is the portal server of particular organization, then in distributed hashtable DHT network described object information is stored in its subordinate server cluster;
If described portal server is then chosen host node for the portal server of acquiescence from described DHT network, described object information is stored in the described host node.
2. the method for claim 1 is characterized in that, described reader obtains the ID of portal server, specifically comprises:
Described reader sends first search request to the type resolution server, and described first search request is carried the ID of described object;
Described type resolution server receives described first search request, and the object type according to the ID of described object obtains described object sends to described reader with described object type;
Described reader receives described object type, obtain the ID of object name analysis service ONS server according to described object type, ONS server to the ID of described ONS server correspondence sends second search request, and described second search request is carried the ID of described object;
Described ONS server receives described second search request, according to the ID of described object, obtains the ID of portal server, and the ID of described portal server is sent to described reader;
Described reader receives the ID of described portal server.
3. method as claimed in claim 2 is characterized in that, described type resolution server specifically comprises according to the object type that the ID of described object obtains described object:
Described type resolution server is determined the coding rule of the ID of described object; According to described coding rule, from the corresponding relation of the coding rule stored and object type, search corresponding object type.
4. method as claimed in claim 2 is characterized in that, described reader obtains the ID of ONS server according to described object type, specifically comprises:
Described reader is according to described object type, searches the ID of corresponding ONS server from the corresponding relation of the object type stored and the ID of ONS server.
5. method as claimed in claim 2 is characterized in that, described ONS server obtains the ID of portal server according to the ID of described object, specifically comprises:
Described ONS server is according to the ID of described object, searches the ID of corresponding portal server from the corresponding relation of the ID of the object stored and the ID of portal server.
6. the method for claim 1 is characterized in that, if described portal server is then chosen host node for the portal server of acquiescence, described object information is stored in the described host node, specifically comprises:
Described portal server calculates hashed value by hash function to the ID of described object, chooses host node according to described hashed value from described DHT network, with the information stores of described object in described host node.
7. the method for claim 1 is characterized in that, described be stored in described object information in the described host node after, also comprise:
Described portal server is transmitted to described storage request the root super node of awl network layer framework;
Described super node receives described storage request, in described awl network layer framework, determines the Minimum Area at described object place according to the positional information of described object, described storage request is transmitted to the super node in described zone;
Described super node receives described storage request, and described storage request is transmitted to ordinary node in the described zone;
Described ordinary node receives described storage request, stores the object ID that described storage request is carried.
8. method as claimed in claim 7 is characterized in that described object information also comprises thingness, correspondingly,
After described ordinary node receives described storage request, also store the thingness that described storage request is carried.
9. method that the object information of claim 1 storage is inquired about is characterized in that described method comprises:
Client is obtained the ID of portal server, sends the portal server of query requests to the ID correspondence of described portal server, and described query requests comprises the ID of object at least;
Described portal server receives described query requests, if described portal server is the portal server of particular organization, then inquires about corresponding object information according to described object ID from its subordinate server cluster, and described object information is sent to described user side;
If described portal server is the portal server of acquiescence, then according to the ID of described object, search the host node of the object information of the described object of storage, the object information of the described object of inquiry sends to described user side with described object information from described host node;
Described user side receives described object information, and shows described object information.
10. method as claimed in claim 9 is characterized in that, described client is obtained the ID of portal server, specifically comprises:
Described client sends the 3rd to the type resolution server and searches request, and the ID of described object is carried in the described the 3rd request of searching;
Described type resolution server receives the described the 3rd and searches request, and the object type according to the ID of described object obtains described object sends to described client with described object type;
Described client receives described object type, obtains the ID of ONS server according to described object type, sends the 4th search request to the ONS server of the ID of described ONS server correspondence, and described the 4th search request is carried the ID of described object;
Described ONS server receives described the 4th search request, according to the ID of described object, obtains the ID of portal server, and the ID of described portal server is sent to described client;
Described client receives the ID of described portal server.
11. method as claimed in claim 9 is characterized in that, described portal server is searched the host node of the object information of the described object of storage according to the ID of described object, specifically comprises:
Described portal server is by hash function, and the ID of described object is calculated hashed value, according to described hashed value, searches the host node of the object information of the described object of storage from the DHT network.
12. the method that the object information of claim 8 storage is inquired about is characterized in that described method comprises:
Client sends query requests, and described query requests is carried the query context and the thingness of user's appointment;
Portal server receives described query requests, if described portal server is the portal server of particular organization, then inquiry thingness is the object information of described thingness the server cluster under it, and described object information is sent to described client;
If described portal server is the portal server of acquiescence, then obtain the object ID that satisfies described thingness from awl level of net framework, according to described object ID, obtain host node, the object information of the described object ID correspondence of inquiry sends to client with described object information from described host node;
Described client receives described object information, shows described object information.
13. method as claimed in claim 12 is characterized in that, described portal server obtains the object ID that satisfies described thingness from awl level of net framework, specifically comprises:
Described portal server sends the root super node of described query requests to described awl level of net framework;
Described super node receives described query requests, determines to comprise the zone of described query context, described query requests sent to the ordinary node in described zone;
Described ordinary node receives described query requests, according to described thingness, searches corresponding object ID from the corresponding relation of the object ID that stored and thingness, and described object ID is sent to described super node;
Described super node receives described object ID, and transmits described object ID and give described portal server;
Described portal server receives described object ID.
CN 201010228461 2010-07-09 2010-07-09 Method for storing and inquiring object information Active CN102006317B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010228461 CN102006317B (en) 2010-07-09 2010-07-09 Method for storing and inquiring object information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010228461 CN102006317B (en) 2010-07-09 2010-07-09 Method for storing and inquiring object information

Publications (2)

Publication Number Publication Date
CN102006317A true CN102006317A (en) 2011-04-06
CN102006317B CN102006317B (en) 2013-05-08

Family

ID=43813388

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010228461 Active CN102006317B (en) 2010-07-09 2010-07-09 Method for storing and inquiring object information

Country Status (1)

Country Link
CN (1) CN102006317B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102184191A (en) * 2011-04-19 2011-09-14 中国联合网络通信集团有限公司 Method and system for inquiring peripheral environment information based on Internet of things, and Internet of things platform
CN103678572A (en) * 2013-12-09 2014-03-26 中国科学院计算机网络信息中心 Method and system for searching for Internet of Things information based on two layers of DHTs
CN106657333A (en) * 2016-12-23 2017-05-10 杭州信雅达数码科技有限公司 Centralized catalog data switching method based on cloud service mode
CN107360217A (en) * 2017-06-21 2017-11-17 深圳市盛路物联通讯技术有限公司 A kind of data reporting method and system based on geographical position and time
CN107888627A (en) * 2017-12-26 2018-04-06 北京车联天下信息技术有限公司 The method, apparatus and server that service security accesses
CN109831494A (en) * 2019-01-21 2019-05-31 生迪智慧科技有限公司 User data management and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090157641A1 (en) * 2007-12-17 2009-06-18 Frank-Uwe Andersen Query routing in distributed database system
CN101505472A (en) * 2008-02-05 2009-08-12 华为技术有限公司 User data server system and apparatus
CN101557423A (en) * 2009-05-07 2009-10-14 北京邮电大学 System and method for realizing streaming media content service

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090157641A1 (en) * 2007-12-17 2009-06-18 Frank-Uwe Andersen Query routing in distributed database system
CN101505472A (en) * 2008-02-05 2009-08-12 华为技术有限公司 User data server system and apparatus
CN101557423A (en) * 2009-05-07 2009-10-14 北京邮电大学 System and method for realizing streaming media content service

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102184191A (en) * 2011-04-19 2011-09-14 中国联合网络通信集团有限公司 Method and system for inquiring peripheral environment information based on Internet of things, and Internet of things platform
CN103678572A (en) * 2013-12-09 2014-03-26 中国科学院计算机网络信息中心 Method and system for searching for Internet of Things information based on two layers of DHTs
CN103678572B (en) * 2013-12-09 2017-03-22 中国科学院计算机网络信息中心 Method and system for searching for Internet of Things information based on two layers of DHTs
CN106657333A (en) * 2016-12-23 2017-05-10 杭州信雅达数码科技有限公司 Centralized catalog data switching method based on cloud service mode
CN106657333B (en) * 2016-12-23 2020-09-22 杭州信雅达数码科技有限公司 Centralized directory data exchange system and method based on cloud service mode
CN107360217A (en) * 2017-06-21 2017-11-17 深圳市盛路物联通讯技术有限公司 A kind of data reporting method and system based on geographical position and time
CN107888627A (en) * 2017-12-26 2018-04-06 北京车联天下信息技术有限公司 The method, apparatus and server that service security accesses
CN109831494A (en) * 2019-01-21 2019-05-31 生迪智慧科技有限公司 User data management and equipment

Also Published As

Publication number Publication date
CN102006317B (en) 2013-05-08

Similar Documents

Publication Publication Date Title
CN102006317B (en) Method for storing and inquiring object information
CN103150394B (en) Distributed file system metadata management method facing to high-performance calculation
CN103392167B (en) The caching method of distributed memory system, node
JP2020038623A (en) Method, device, and system for storing data
WO2018058949A1 (en) Data storage method, device and system
US20160364407A1 (en) Method and Device for Responding to Request, and Distributed File System
CN101442558B (en) Method and system for providing index service for P2SP network
US10831737B2 (en) Method and device for partitioning association table in distributed database
CN103095727B (en) P2p resource location method
CN109542861B (en) File management method, device and system
CN104378452A (en) Method, device and system for domain name resolution
US20150264448A1 (en) Interactive personal/internet protocol television reservation system, reservation plan management method and device
US9692847B2 (en) Content distribution method and content distribution server
KR101654314B1 (en) Distributed processing system in spatial data and method for operating the same
CN105893542A (en) Method and system for redistributing cold data files in cloud storage system
JP2013156960A (en) Generation program, generation method, and generation system
CN103049574A (en) Key value system and key value method for implementation of dynamic duplicates of documents
CN102724301B (en) Cloud database system and method and equipment for reading and writing cloud data
CN111274004B (en) Process instance management method and device and computer storage medium
CN108173899B (en) Information processing method and device of block chain
CN112422611B (en) Virtual bucket storage processing method and system based on distributed object storage
CN103825922B (en) A kind of data-updating method and web server
CN116541427B (en) Data query method, device, equipment and storage medium
KR101368500B1 (en) Method for providing database history management and the database management system thereof
CN113905252B (en) Data storage method and device for live broadcasting room, electronic equipment and storage medium

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