WO2013010432A1 - Method, node and system for data storage and query in peer network - Google Patents
Method, node and system for data storage and query in peer network Download PDFInfo
- Publication number
- WO2013010432A1 WO2013010432A1 PCT/CN2012/077743 CN2012077743W WO2013010432A1 WO 2013010432 A1 WO2013010432 A1 WO 2013010432A1 CN 2012077743 W CN2012077743 W CN 2012077743W WO 2013010432 A1 WO2013010432 A1 WO 2013010432A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- index
- node
- storage node
- query
- 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.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/182—Distributed file systems
- G06F16/1834—Distributed file systems implemented based on peer-to-peer networks, e.g. gnutella
Definitions
- the present invention relates to peer-to-peer network data management techniques, and more particularly to a method, node and system for data storage and query in a peer-to-peer network. Background technique
- a Peer to Peer (P2P) network is a distributed network in which participants of the network share their own resources and services.
- the sharing of these resources and services includes: sharing and exchange of information, computing resources, such as CPU, sharing, storage resources, such as cache and disk space, sharing.
- computing resources such as CPU
- sharing storage resources
- cache and disk space sharing.
- These shared resources and services can be accessed by any peer node (Peer) in the network.
- Peer peer node
- Each participant in a peer-to-peer network is both a resource and a service provider (server), and a resource and service provider (client).
- Structured P2P networks usually use the Disrtibutded Hash Table (DHT) method as a resource location technology.
- the DHT method implements the three functions of topology construction, message routing and resource search of P2P system.
- each node has a unique node identifier, that is, it is dynamically generated according to its IP address by a hash function or according to a certain rule, and the system constructs a P2P network topology according to the node identifier.
- Each node maintains a "routing table" that holds information about the neighbor nodes.
- the DHT message routing process is similar to the IP routing process.
- Each node forwards the message to the corresponding neighbor node according to the routing table until the message finally reaches the target node.
- each related node needs to modify the routing table and dynamically adjust it to maintain the consistency of the distributed hash table.
- data stored in such a structured P2P network can only be accurately searched based on the primary keyword. It is difficult to query according to a specific search attribute of the searched information, for example: according to the word segment Conditional or fuzzy queries are more difficult.
- the common techniques in the prior art that enable searching based on attributes are: Select some nodes with higher performance as super nodes, and store metadata randomly on a super node.
- the query request is sent to a super node, such as super node A, and then the super node A forwards the query to all the other super nodes, and all super nodes perform fuzzy query on the locally stored metadata, and then The query result is returned to the super node A that forwards the request, and then the super node A returns the query result to the ordinary node.
- a super node such as super node A
- the specific steps for the existing data storage and query for the above techniques are as follows:
- FIG. 1 is a schematic flowchart of data storage in the prior art. As shown in FIG. 1, the storage process includes:
- Step 101 The data storage request node obtains a data resource identifier, that is, a resource ID, by performing a hash operation on the primary identifier of the data to be stored.
- Step 102 The data storage request node sends a storage request to the data storage node by using a P2P algorithm.
- Step 103 The data storage node stores the data according to the received storage request, and returns a result to the data storage request node.
- Step 104 The data storage request node randomly selects a super node A, and sends a request for storing the metadata, where the index information, that is, the main identifier of the data to be stored and the index information of the data storage node are included;
- Step 105 The super node A stores the metadata according to the received request, and returns a result to the data storage request node.
- the data to be stored and its index information are stored in the P2P network, and the nodes in the network can perform conditional or fuzzy query on them.
- FIG. 2 is a schematic flowchart of a data query in the prior art. As shown in FIG. 2, the query process includes:
- Step 201 The data query request node specifies a query condition, and all the nodes are The super node sends a request for querying metadata;
- Step 202 All the super nodes perform, according to the received query condition, the metadata that satisfies the condition in the locally stored metadata.
- Step 203 All the super nodes return the query result to the data query request node.
- Step 204 The data query request node reads the main identifier of the data from the queried metadata, and performs a hash operation to obtain the resource ID.
- Step 205 The data query requesting node sends a query data request to the data storage node according to the P2P algorithm.
- Step 206 The data storage node obtains corresponding data according to the resource ID, and returns it to the data query request node.
- the data query request node obtains the required data based on some or all of the matching conditions.
- the main purpose of the embodiments of the present invention is to provide a method, a node, and a system for storing and querying data in a peer-to-peer network, which solves the problem that the index data set must be stored in a small number of super nodes in the prior art.
- the problem of heavy storage and query burden of the super node is solved, and the problem of low query efficiency is solved.
- the embodiment of the present invention provides a method for data storage and query in a peer-to-peer network, where the method includes:
- the corresponding data is obtained according to the data resource identifier or the data identifier query.
- the method further includes: when the specified data needs to be deleted, the method further includes:
- the data storage node After generating the data resource identifier according to the identifier of the specified data, sending the deletion request to the data storage node; after deleting the data, the data storage node separately sends a delete index request to each index storage node according to each search attribute of the data. After each index storage node receives the delete index request, the corresponding index relationship is deleted.
- the search attribute includes: an attribute name and an attribute value.
- the determining the index storage node includes: one or more index storage nodes preset for each individual search attribute; or generating one or more attribute resource identifiers according to attribute names of the individual search attributes, and then according to One or more index storage nodes as determined by a peer-to-peer (P2P) algorithm.
- P2P peer-to-peer
- the querying the index relationship from the index storage node according to the search attribute includes: sending an inquiry request after determining the index storage node according to the search attribute to be queried; and one or more index storage nodes matching according to the query request, Match all index relationships that match.
- the obtaining, according to the data resource identifier or the data identifier query, the corresponding data specifically:
- Each data storage node is determined according to the data resource identifier or the data identifier in each index relationship, and then the data obtained by the query is obtained from each data storage node.
- the embodiment of the present invention further provides a system for data storage and query in a peer-to-peer network, where the system includes: a data storage request node, a data storage node, an index storage node, and a data query request node, where
- the data storage request node is configured to generate data resources according to identifiers of data to be stored After the source identifier is stored, the data to be stored is stored in the data storage node, and the index storage node is determined according to each search attribute of the data, and the data resource identifier or the data identifier and the index relationship of the search attribute are stored in the Cable bow I storage node;
- the data query requesting node is configured to query the data, and after querying the index relationship from the index storage node according to the search attribute, obtain the corresponding data according to the data resource identifier or the data identifier query.
- the system further includes: a data deletion requesting node, configured to: after the specified data needs to be deleted, generate a data resource identifier according to the identifier of the specified data, and send the deletion request to the data storage node;
- the data storage node is further configured to delete the data, and send a delete index request to each index storage node according to each search attribute of the data;
- the index storage node is further configured to delete the corresponding index relationship after receiving the delete index request.
- the search attribute includes: an attribute name and an attribute value
- Determining the index storage node comprising: one or more index storage nodes preset for each individual search attribute; or generating one or more attribute resource identifiers according to attribute names of the individual search attributes, and then according to the P2P algorithm One or more index storage nodes identified.
- the data query requesting node queries the index storage node to the index relationship according to the search attribute, and includes:
- the query request is sent; and one or more index storage nodes perform matching according to the query request to obtain all index relationships that match the matching.
- a node for data storage and query in a peer-to-peer network includes: a storage module, an index determination module, and a query module, where
- the storage module is configured to generate a data resource identifier according to the identifier of the data that needs to be stored, Depositing the data to be stored into a data storage node;
- the index determining module is configured to determine an index storage node according to each search attribute of the data, and store the data resource identifier or the data identifier and the index relationship of the search attribute into the index storage node;
- the query module when used for querying data, queries the index storage node according to the search attribute to the index relationship, and obtains corresponding data according to the data resource identifier or the data identifier query.
- the method, the node, and the system for storing and querying the data in the peer-to-peer network provided by the embodiment of the present invention, after generating the data resource identifier according to the identifier of the data to be stored, storing the data to be stored in the data storage node; Determining, by the index storage node, the data storage identifier or the data identifier, and the index relationship of the search attribute are stored in the index storage node; when querying the data, querying from the index storage node according to the search attribute After the index relationship, the corresponding data is obtained according to the data resource identifier or the data identifier query.
- the index data can be stored in different nodes of the P2P network, and is no longer limited to being stored in the super node, which improves the decentralization of storage and query; only one or a few nodes are queried when performing conditional query. , the query efficiency is relatively high.
- FIG. 3 is a schematic flow chart of a method for storing and querying data in a peer-to-peer network according to an embodiment of the present invention
- FIG. 5 is a schematic flowchart of data query in Embodiment 1 of the present invention.
- Embodiment 6 is a schematic flowchart of data deletion in Embodiment 1 of the present invention.
- FIG. 7 is a schematic structural diagram of a network according to Embodiment 1 of the present invention.
- FIG. 8 is a schematic structural diagram of a system for storing and querying data in a peer-to-peer network according to an embodiment of the present invention.
- FIG. 9 is a schematic structural diagram of a node for data storage and query in a peer-to-peer network according to an embodiment of the present invention. detailed description
- the basic idea of the embodiment of the present invention is: after generating the data resource identifier according to the identifier of the data to be stored, storing the data to be stored in the data storage node; determining an index storage node according to each search attribute of the data, and The resource identifier or the data identifier, and the index relationship of the search attribute are stored in the index storage node; when querying the data, after querying the index relationship from the index storage node according to the search attribute, according to the data resource identifier or the data identifier therein The query obtains the corresponding data.
- FIG. 3 is a schematic flowchart of a method for storing and querying data in a peer-to-peer network according to an embodiment of the present invention. As shown in FIG. 3, the method specifically includes the following steps:
- Step 301 After generating the data resource identifier according to the identifier of the data to be stored, storing the data to be stored in the data storage node.
- the generating the data resource identifier according to the identifier of the data to be stored specifically: performing a hash operation to generate the data resource identifier according to the unique identifier of the data to be stored.
- the storing the data to be stored in the data storage node specifically: determining a data storage node according to a P2P algorithm adopted by the network, and then storing the data in the data storage node.
- Step 302 Determine an index storage node according to each search attribute of the data, and store the data resource identifier or the data identifier and the index relationship of the search attribute into the index storage node.
- the search attribute includes: Name and attribute value. Determining the index storage node, comprising: one or more index storage nodes preset for each individual search attribute; or generating one or more attribute resource identifiers according to attribute names of the individual search attributes, and then according to the P2P algorithm One or more index storage nodes identified. Where an index of an attribute Relationships can be stored on an index storage node or on multiple index storage nodes. It should be further noted that the index relationship of the same attribute of multiple data can be distributed and stored on several nodes to reduce the burden of a single index storage node. When the amount of index data is small, the index relationship of the same attribute can be stored only on one node. At this time, the attribute resource identifier can be directly generated by the attribute name.
- Step 303 When querying data, querying the index relationship from the index storage node according to the search attribute, and obtaining corresponding data according to the data resource identifier or the data identifier query therein.
- the querying the index relationship from the index storage node according to the search attribute includes: sending an index query request after determining an index storage node according to the search attribute to be queried; and one or more index storage nodes matching according to the query request , get all the index relationships that match the match.
- the matching manner may be a fuzzy matching.
- the determined index storage node includes: one or more index storage nodes preset for each individual search attribute; or one or more attribute resource identifiers according to attribute names of respective individual search attributes, and then according to a P2P algorithm One or more index storage nodes identified.
- the obtaining the corresponding data according to the data resource identifier or the data identifier query is specifically: determining each data storage node according to the data resource identifier or the data identifier in each index relationship, and then obtaining the data obtained by the query from each data storage node.
- the method further includes: after generating the data resource identifier according to the identifier of the specified data, sending the deletion request to the data storage node; the data storage node deleting the data, according to the Each search attribute of the data respectively sends a delete index request to each index storage node; after receiving the delete index request, each index storage node deletes the corresponding index relationship.
- the data may be deleted before the delete index request is sent, or after the index relationship is deleted.
- the method further includes returning the result of the processing to the node that sends the message. Which requires special instructions
- step 102 after the index storage node stores the index relationship successfully, the node returns a success result to the node that sends the data storage request, and the node that sends the data storage request may further send the index relationship to the data storage node. Save it in order to facilitate further maintenance of the index relationship.
- the data storage request node in the storage process stores data in a P2P network according to a unique identifier of the data; the data has two attributes required Support conditional query: Attribute 1, Attribute 2, so you need to index these two attributes, that is, generate the index data identifier according to the name of Attribute 1 and the name of Attribute 2, or according to the configuration of the attribute and the corresponding relationship of the index storage node.
- the index relationship is stored in the P2P network, and the number of index storage nodes of each attribute is assumed to be 3.
- Step 401 The data storage request node (set to node 8) obtains the unique identifier of the data 1 by hash operation. Its resource identifier is called a data resource identifier.
- Step 402 the data storage request node 8 stores data according to the P2P algorithm used by the network in the responsible node of the data (set to node 3), that is, the data storage node 3;
- Step 403 the data storage node 3 stores the data in the storage request, and returns the result to the data storage request node 8;
- Step 404 the data storage request node 8 takes a random number within 3 (for example, 2), splices the name of the attribute 1 with the character "2”, generates an identification string, and hashes the attribute resource identifier;
- Step 405 The data storage requesting node 8 stores the index relationship of the attribute 1 of the data 1 in the index storage node (set to node 9) according to the P2P algorithm used by the network;
- the index relationship includes at least: a data resource identifier or a data identifier of the data 1, that is, a unique identifier of the data 1, and a value of the attribute 1.
- Step 406 the index storage node 9 stores the index relationship of the attribute 1 of the data, and saves the data to the data.
- the storage request node 8 returns a response;
- Step 407 The data storage request node 8 takes a random number (for example, 1) within 3, splices the attribute 2 name with the character "1", generates an identification string, and performs a hash operation to obtain the attribute resource identifier;
- Step 408 the data storage requesting node 8 stores the index relationship of the attribute 2 of the data 1 in the index storage node (set to the node 20) according to the P2P algorithm adopted by the network;
- the index relationship includes at least: a data resource identifier or a data identifier of the data 1, that is, a unique identifier of the data 1, and a value of the attribute 2.
- Step 409 the index storage node 20 stores the index relationship of the attribute 2 of the data, and returns a response to the data storage request node 8.
- multiple attribute resource identifiers can be generated for the same attribute name, so that the index relationship of the same attribute name can be stored on multiple nodes.
- the index storage node 9 and the index storage node 16, respectively that is, the index relationship of the attribute 1 is stored in the index storage node 1, the index storage node 9, and the index storage node 16, respectively.
- the data storage request node After the index storage node completes the storage of the index relationship, the data storage request node returns a response, and the data storage request node 8 may also store the information of the index storage node (for example, node 9 and node 20) on the data storage node 3, For use in maintenance.
- FIG. 5 is a schematic flowchart of data query in the first embodiment of the present invention.
- the data query node in the query process determines one or more index storages of the attribute according to the attribute and the index storage policy corresponding to the query condition.
- the node queries the index storage nodes for the index relationship that satisfies the condition, and then queries the corresponding data according to the data unique identifier or the data resource identifier in the index relationship.
- the specific process is: Step 501:
- the data query requesting node 14 sets a query condition for the attribute 1 of the data to be queried.
- the Greek operation obtains three attribute resource identifiers.
- the responsible nodes of the three attribute resource identifiers are: an index storage node 1, an index storage node 9, and an index storage node 16;
- Step 503 the data query requesting node 14 sends an index query request to the index storage node 1; Step 504, after receiving the request, the index storage node 1 performs condition matching (such as fuzzy matching) on the locally stored index relationship, and requests the data query. Node 14 returns a matching result;
- condition matching such as fuzzy matching
- Step 505 the data query requesting node 14 sends an index query request to the index storage node 9;
- Step 506 after receiving the request, the index storage node 9 performs condition matching (such as fuzzy matching) on the locally stored index relationship, and requests the data query.
- Node 14 returns a matching result;
- Step 507 the data query requesting node 14 sends an index query request to the index storage node 16;
- Step 508 after receiving the request, the index storage node 16 performs condition matching (may be fuzzy matching) on the locally stored index relationship, and queries the data.
- the requesting node 14 returns a matching result.
- Step 509 Synthesize an index relationship (or possibly one or only one) that satisfies the matching condition returned by all index storage nodes, and select a certain index or some index relationships according to the query requirement;
- Step 510 The data query requesting node 14 obtains the data resource identifier by hashing the unique identifier of the data in the index relationship;
- the step 510 is not required.
- Step 511 The data query requesting node 14 sends a data query request to the data storage node 3 according to the P2P algorithm adopted by the network;
- Step 512 the data storage node 3 reads the corresponding storage data according to the request, and queries the node. It is returned to the query requesting node 14.
- FIG. 6 is a schematic flowchart of data deletion in the first embodiment of the present invention. As shown in FIG. 6, when data (for example, data 1) needs to be deleted, all corresponding attributes (for example, attribute 1, attribute 2) need to be deleted. The index relationship is also deleted. The specific process is:
- Step 601 The data deletion requesting node 19 performs a hash operation on the unique identifier of the specified data to obtain a data resource identifier.
- Step 602 the data deletion requesting node 19 sends a deletion request to the data storage node 3 according to the P2P algorithm adopted by the network;
- the three attribute resource identifiers in this step may also be obtained from the data storage node 3, which is determined by the storage policy.
- Step 604 The data storage node 3 sends a request to delete the index relationship of the attribute 1 to the index storage node 1, the index storage node 9, and the index storage node 16, according to the P2P algorithm adopted by the network.
- Step 605 The responsible node of the three attribute resource identifiers of the attribute 1 deletes the corresponding index relationship after receiving the request, and returns the result to the data storage node 3;
- the three attribute resource identifiers in this step may also be obtained from the data storage node 3, which is determined by the storage policy.
- Step 607 The data storage node 3 sends a request for deleting the index relationship of the attribute 2 to the network according to the P2P algorithm adopted by the network, and the related index storage node deletes the index relationship after receiving the request, and returns the result to the data storage node 3, and the data storage node 3 delete the data, delete the data
- the requesting node 19 returns the deletion result.
- FIG. 7 is a schematic diagram of a network structure according to Embodiment 1 of the present invention.
- node 3 is a storage node of data 1
- node 9 and Node 16 is an index storage node of attribute 1 of data 1
- node 6, node 11 and node 20 are index storage nodes of attribute 2 of data 1
- node 8 is a data storage request node
- node 14 is a data query request node
- FIG. 8 is a schematic structural diagram of a system for storing and querying data in a peer-to-peer network according to an embodiment of the present invention.
- the system includes: a data storage request node 81, a data storage node 82, an index storage node 83, and data.
- Querying request node 84 wherein
- the data storage requesting node 81 is configured to: after generating the data resource identifier according to the identifier of the data to be stored, storing the data to be stored in the data storage node 82, and determining the index storage node 83 according to each search attribute of the data.
- the data resource identifier or the data identifier, and the index relationship of the search attribute are stored in the storage node 83;
- the data storage requesting node 81 generates a data resource identifier according to the identifier of the data to be stored, and specifically: the data storage requesting node 81 performs a hash operation to generate a data resource identifier according to the unique identifier of the data to be stored.
- the data to be stored is stored in the data storage node 82.
- the data storage node 82 is determined according to the P2P algorithm adopted by the network, and then the data is stored in the data storage node 82.
- the search attributes include: an attribute name and an attribute value.
- the determined index storage node 83 includes: one or more index storage nodes 83 preset for each individual search attribute; or generate one or more attribute resource identifiers according to attribute names of the respective individual search attributes, and then according to One or more index storage nodes 83 determined by the P2P algorithm.
- the index relationship of an attribute may be stored in an index storage node 83 or may be stored in multiple index storage nodes 83.
- the index relationship of the same attribute of multiple data can be stored in a distributed manner. Several indexes are stored on the node 83 to reduce the burden on the single index storage node 83. When the index data volume is small, the index relationship of the same attribute can be stored only on one index storage node 83. At this time, the attribute resource identifier can be directly generated by the attribute name.
- the data query requesting node 84 when used for querying data, queries the index storage relationship from the index storage node 83 according to the search attribute, and obtains corresponding data according to the data resource identifier or the data identifier query therein.
- the data query requesting node 84 queries the index storage node 83 to the index relationship according to the search attribute, including: after determining the index storage node 83 according to the search attribute to be queried, sending an index query request; one or more indexes
- the storage node 83 performs matching according to the query request, and obtains all index relationships that match the matching.
- the matching manner may be a fuzzy matching.
- the determined index storage node 83 includes: one or more index storage nodes 83 preset for each individual search attribute; or generate one or more attribute resource identifiers according to attribute names of the respective individual search attributes, and then according to One or more index storage nodes 83 determined by the P2P algorithm.
- the obtaining the corresponding data according to the data resource identifier or the data identifier query specifically: determining each data storage node 82 according to the data resource identifier or the data identifier in each index relationship, and then obtaining the query from each data storage node 82. data.
- system further includes: a data deletion requesting node 85, configured to: after the specified data needs to be deleted, generate a data resource identifier according to the identifier of the specified data, and send the deletion request to the data storage node 82;
- the data storage node 82 is further configured to delete the data, and send a delete index request to each index storage node 83 according to each search attribute of the data;
- the data may be deleted before the delete index request is sent, or after the received index relationship is deleted.
- the index storage node 83 is further configured to delete the corresponding index relationship after receiving the delete index request. Further, in the system, after each node performs processing according to the received message, the method further includes returning the result of the processing to the node that sends the message. Specifically, the index storage node 83 returns a success result to the node 81 that sends the data storage request after the index relationship is successfully stored, and the node 81 that sends the data storage request may further further use the index. The relationship is sent to the data storage node 82 for storage to facilitate subsequent maintenance of the index relationship.
- FIG. 9 is a schematic structural diagram of a node for data storage and query in a peer-to-peer network according to an embodiment of the present invention.
- the node includes: a storage module 91, an index determining module 92, and a query module 93, where
- the storage module 91 is configured to: after generating the data resource identifier according to the identifier of the data that needs to be stored, storing the data that needs to be stored into the data storage node;
- the index determining module 92 is configured to determine, according to each search attribute of the data, an index storage node, and store the data resource identifier or the data identifier, and the index relationship of the search attribute into the index storage node;
- the query module 93 is configured to query the data, and after querying the index relationship from the index storage node according to the search attribute, obtain corresponding data according to the data resource identifier or the data identifier query.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Computer And Data Communications (AREA)
Abstract
Description
一种对等网络中数据存储和查询的方法、 节点及系统 技术领域 Method, node and system for data storage and query in peer-to-peer network
本发明涉及对等网络数据管理技术, 特别是指一种对等网络中数据存 储和查询的方法、 节点及系统。 背景技术 The present invention relates to peer-to-peer network data management techniques, and more particularly to a method, node and system for data storage and query in a peer-to-peer network. Background technique
对等(Peer to Peer, P2P ) 网络是一种分布式网络, 网络的参与者共享 各自所拥有的资源和服务。 通常这些资源和服务的共享包括: 信息的共享 与交换、 计算资源, 例如 CPU, 的共享、 存储资源, 例如緩存和磁盘空间, 的共享等。 这些共享资源和服务能被网络中的任意对等节点 (Peer )访问。 在对等网络中的每个参与者都既是资源和服务提供者 (server ), 又是资源 和服务获取者( client )。 A Peer to Peer (P2P) network is a distributed network in which participants of the network share their own resources and services. Usually, the sharing of these resources and services includes: sharing and exchange of information, computing resources, such as CPU, sharing, storage resources, such as cache and disk space, sharing. These shared resources and services can be accessed by any peer node (Peer) in the network. Each participant in a peer-to-peer network is both a resource and a service provider (server), and a resource and service provider (client).
结构化 P2P网络通常采用分布哈希表 ( Disrtibutded Hash Table, DHT ) 方法作为资源定位技术。 DHT方法中同时实现了 P2P系统的拓朴构造、 消 息路由和资源搜索三大功能。 在 DHT方法中, 每个节点都有唯一的节点标 识, 即通过哈希函数根据其 IP地址得到或根据某种规则动态创建, 系统根 据节点标识构建 P2P网络拓朴。 每个节点都维护一个 "路由表", 其中保存 了相关邻居节点的信息。 DHT消息路由过程与 IP路由过程相似, 每个节点 根据所述路由表将消息转发到相应的邻居节点上, 直到消息最终到达目标 节点。 当节点加入或退出时, 各相关节点需要修改路由表, 并动态调整, 以维护分布哈希表的一致性。 Structured P2P networks usually use the Disrtibutded Hash Table (DHT) method as a resource location technology. The DHT method implements the three functions of topology construction, message routing and resource search of P2P system. In the DHT method, each node has a unique node identifier, that is, it is dynamically generated according to its IP address by a hash function or according to a certain rule, and the system constructs a P2P network topology according to the node identifier. Each node maintains a "routing table" that holds information about the neighbor nodes. The DHT message routing process is similar to the IP routing process. Each node forwards the message to the corresponding neighbor node according to the routing table until the message finally reaches the target node. When a node joins or exits, each related node needs to modify the routing table and dynamically adjust it to maintain the consistency of the distributed hash table.
但是, 在这种结构化的 P2P网络中存储的数据, 通常只能根据主关键 词进行精确查找, 如果要根据被搜索信息的某个特定搜索属性进行查询则 比较困难, 例如: 根据词语片段进行条件或模糊查询则比较困难。 现有技术中能够实现根据属性进行查找的常用技术是: 选择一些性能 较高的节点作为超级节点, 将元数据随机存储在某个超级节点上。 普通节 点进行模糊查询时, 将查询请求发给某个超级节点, 例如超级节点 A, 然 后由该超级节点 A向其余所有超级节点转发查询, 所有超级节点对本地存 储的元数据进行模糊查询, 然后将查询结果返回给转发请求的超级节点 A, 再由超级节点 A将查询结果返回给普通节点。 针对上述技术现有的数据存 储和查询的具体步驟如下所述: However, data stored in such a structured P2P network can only be accurately searched based on the primary keyword. It is difficult to query according to a specific search attribute of the searched information, for example: according to the word segment Conditional or fuzzy queries are more difficult. The common techniques in the prior art that enable searching based on attributes are: Select some nodes with higher performance as super nodes, and store metadata randomly on a super node. When a normal node performs a fuzzy query, the query request is sent to a super node, such as super node A, and then the super node A forwards the query to all the other super nodes, and all super nodes perform fuzzy query on the locally stored metadata, and then The query result is returned to the super node A that forwards the request, and then the super node A returns the query result to the ordinary node. The specific steps for the existing data storage and query for the above techniques are as follows:
图 1为现有技术的数据存储的流程示意图, 如图 1所示, 所述存储流 程包括: FIG. 1 is a schematic flowchart of data storage in the prior art. As shown in FIG. 1, the storage process includes:
步驟 101 ,数据存储请求节点对需要存储的数据的主标识哈希运算后得 到数据资源标识, 即资源 ID; Step 101: The data storage request node obtains a data resource identifier, that is, a resource ID, by performing a hash operation on the primary identifier of the data to be stored.
步驟 102,数据存储请求节点通过 P2P算法向数据存储节点发送存储请 求; Step 102: The data storage request node sends a storage request to the data storage node by using a P2P algorithm.
步驟 103 ,数据存储节点根据收到的存储请求将数据存储下来, 并向数 据存储请求节点返回结果; Step 103: The data storage node stores the data according to the received storage request, and returns a result to the data storage request node.
步驟 104, 数据存储请求节点随机选择一个超级节点 A, 向其发送存储 元数据的请求, 其中包含索引信息, 即需要存储的数据的主标识和数据存 储节点的索引信息; Step 104: The data storage request node randomly selects a super node A, and sends a request for storing the metadata, where the index information, that is, the main identifier of the data to be stored and the index information of the data storage node are included;
步驟 105 , 超级节点 A根据收到的请求存储该元数据, 并向数据存储 请求节点返回结果。 Step 105: The super node A stores the metadata according to the received request, and returns a result to the data storage request node.
这样, 所要存储的数据及其索引信息就存储在 P2P网络中了, 网络中 的节点可以对其进行条件或模糊查询。 In this way, the data to be stored and its index information are stored in the P2P network, and the nodes in the network can perform conditional or fuzzy query on them.
图 2为现有技术的数据查询的流程示意图, 如图 2所示, 所述查询流 程包括: 2 is a schematic flowchart of a data query in the prior art. As shown in FIG. 2, the query process includes:
步驟 201 , 数据查询请求节点指定查询条件, 通过一个超级节点向所有 超级节点发送查询元数据的请求; Step 201: The data query request node specifies a query condition, and all the nodes are The super node sends a request for querying metadata;
步驟 202, 所有超级节点都根据收到的查询条件,在本地存储的元数据 中进行查询满足条件的元数据; Step 202: All the super nodes perform, according to the received query condition, the metadata that satisfies the condition in the locally stored metadata.
步驟 203 , 所有超级节点向数据查询请求节点返回查询结果; 步驟 204, 数据查询请求节点从查询到的元数据中读取数据的主标识, 进行哈希运算后得到资源 ID; Step 203: All the super nodes return the query result to the data query request node. Step 204: The data query request node reads the main identifier of the data from the queried metadata, and performs a hash operation to obtain the resource ID.
步驟 205 ,数据查询请求节点根据 P2P算法向数据存储节点发送查询数 据请求; Step 205: The data query requesting node sends a query data request to the data storage node according to the P2P algorithm.
步驟 206, 数据存储节点根据资源 ID取得对应的数据, 并将其向数据 查询请求节点返回。 Step 206: The data storage node obtains corresponding data according to the resource ID, and returns it to the data query request node.
这样, 数据查询请求节点就根据部分或全部匹配条件取得了需要的数 据。 Thus, the data query request node obtains the required data based on some or all of the matching conditions.
但在这种方法中所有元数据, 即索引数据, 都较集中的存储在数量较 少的超级节点上, 导致超级节点的存储和查询负担较重; 而且, 每次条件 查询都要查询全部超级节点, 导致查询效率较低。 发明内容 However, in this method, all metadata, that is, index data, are stored in a relatively small number of super nodes, resulting in a heavy node storage and query burden; and, for each conditional query, all supers are queried. Nodes, resulting in less efficient queries. Summary of the invention
有鉴于此, 本发明实施例的主要目的在于提供一种对等网络中数据存 储和查询的方法、 节点及系统, 解决了现有技术中必须将索引数据集中的 存储在数量较少的超级节点上, 导致超级节点的存储和查询负担较重的问 题, 并且解决了查询效率较低的问题。 In view of this, the main purpose of the embodiments of the present invention is to provide a method, a node, and a system for storing and querying data in a peer-to-peer network, which solves the problem that the index data set must be stored in a small number of super nodes in the prior art. The problem of heavy storage and query burden of the super node is solved, and the problem of low query efficiency is solved.
为解决上述技术问题, 本发明实施例的技术方案是这样实现的: 本发明实施例提供了一种对等网络中数据存储和查询的方法, 所述方 法包括: In order to solve the above technical problem, the technical solution of the embodiment of the present invention is implemented as follows: The embodiment of the present invention provides a method for data storage and query in a peer-to-peer network, where the method includes:
根据需要存储的数据的标识生成数据资源标识后, 将所述需要存储的 数据存入数据存储节点; 根据所述数据的各个搜索属性确定索引存储节点, 将数据资源标识或 数据标识, 以及所述搜索属性的索引关系存入所述索引存储节点; After generating the data resource identifier according to the identifier of the data to be stored, storing the data to be stored in the data storage node; Determining an index storage node according to each search attribute of the data, storing a data resource identifier or a data identifier, and an index relationship of the search attribute into the index storage node;
查询数据时, 根据搜索属性从所述索引存储节点查询到索引关系后, 根据其中的数据资源标识或数据标识查询获得对应的数据。 When the data is queried, after the index relationship is queried from the index storage node according to the search attribute, the corresponding data is obtained according to the data resource identifier or the data identifier query.
其中, 当指定的数据需要删除时, 所述方法还包括: The method further includes: when the specified data needs to be deleted, the method further includes:
根据所述指定的数据的标识生成数据资源标识后, 将删除请求发送给 数据存储节点; 数据存储节点删除所述数据后, 根据所述数据的各搜索属 性分别向各索引存储节点发送删除索引请求; 各索引存储节点接到删除索 引请求后, 删除对应的索引关系。 After generating the data resource identifier according to the identifier of the specified data, sending the deletion request to the data storage node; after deleting the data, the data storage node separately sends a delete index request to each index storage node according to each search attribute of the data. After each index storage node receives the delete index request, the corresponding index relationship is deleted.
其中, 所述搜索属性包括: 属性名称和属性值。 The search attribute includes: an attribute name and an attribute value.
其中, 所述确定的索引存储节点, 包括: 针对各个单独的搜索属性预 设的一个或多个索引存储节点; 或者根据各个单独的搜索属性的属性名生 成一个或多个属性资源标识, 然后根据对等(P2P )算法确定的一个或多个 索引存储节点。 The determining the index storage node includes: one or more index storage nodes preset for each individual search attribute; or generating one or more attribute resource identifiers according to attribute names of the individual search attributes, and then according to One or more index storage nodes as determined by a peer-to-peer (P2P) algorithm.
其中, 所述根据搜索属性从所述索引存储节点查询到索引关系, 包括: 根据待查询的搜索属性确定索引存储节点后, 发送查询请求; 一个或 多个索引存储节点根据查询请求进行匹配, 得到符合匹配的所有索引关系。 The querying the index relationship from the index storage node according to the search attribute includes: sending an inquiry request after determining the index storage node according to the search attribute to be queried; and one or more index storage nodes matching according to the query request, Match all index relationships that match.
其中, 所述根据其中的数据资源标识或数据标识查询获得对应的数据, 具体为: The obtaining, according to the data resource identifier or the data identifier query, the corresponding data, specifically:
根据各个索引关系中的数据资源标识或数据标识确定各数据存储节 点 , 然后从各数据存储节点获取查询得到的数据。 Each data storage node is determined according to the data resource identifier or the data identifier in each index relationship, and then the data obtained by the query is obtained from each data storage node.
本发明实施例还提供了一种对等网络中数据存储和查询的系统, 所述 系统包括: 数据存储请求节点、 数据存储节点、 索引存储节点和数据查询 请求节点, 其中, The embodiment of the present invention further provides a system for data storage and query in a peer-to-peer network, where the system includes: a data storage request node, a data storage node, an index storage node, and a data query request node, where
所述数据存储请求节点, 用于根据需要存储的数据的标识生成数据资 源标识后, 将所述需要存储的数据存入数据存储节点, 根据所述数据的各 个搜索属性确定索引存储节点, 将数据资源标识或数据标识, 以及所述搜 索属性的索引关系存入所述索弓 I存储节点; The data storage request node is configured to generate data resources according to identifiers of data to be stored After the source identifier is stored, the data to be stored is stored in the data storage node, and the index storage node is determined according to each search attribute of the data, and the data resource identifier or the data identifier and the index relationship of the search attribute are stored in the Cable bow I storage node;
所述数据查询请求节点, 用于查询数据时, 根据搜索属性从所述索引 存储节点查询到索引关系后, 根据其中的数据资源标识或数据标识查询获 得对应的数据。 The data query requesting node is configured to query the data, and after querying the index relationship from the index storage node according to the search attribute, obtain the corresponding data according to the data resource identifier or the data identifier query.
其中, 所述系统还包括: 数据删除请求节点, 用于当指定的数据需要 删除时, 根据所述指定的数据的标识生成数据资源标识后, 将删除请求发 送给数据存储节点; The system further includes: a data deletion requesting node, configured to: after the specified data needs to be deleted, generate a data resource identifier according to the identifier of the specified data, and send the deletion request to the data storage node;
所述数据存储节点, 还用于删除所述数据, 根据所述数据的各搜索属 性分别向各索引存储节点发送删除索引请求; The data storage node is further configured to delete the data, and send a delete index request to each index storage node according to each search attribute of the data;
所述索引存储节点, 还用于接到删除索引请求后, 删除对应的索引关 系。 The index storage node is further configured to delete the corresponding index relationship after receiving the delete index request.
其中, 所述搜索属性包括: 属性名称和属性值; The search attribute includes: an attribute name and an attribute value;
所述确定的索引存储节点, 包括: 针对各个单独的搜索属性预设的一 个或多个索引存储节点; 或者根据各个单独的搜索属性的属性名生成一个 或多个属性资源标识, 然后根据 P2P算法确定的一个或多个索引存储节点。 Determining the index storage node, comprising: one or more index storage nodes preset for each individual search attribute; or generating one or more attribute resource identifiers according to attribute names of the individual search attributes, and then according to the P2P algorithm One or more index storage nodes identified.
其中, 所述数据查询请求节点根据搜索属性从所述索引存储节点查询 到索引关系, 包括: The data query requesting node queries the index storage node to the index relationship according to the search attribute, and includes:
所述数据查询请求节点根据待查询的搜索属性确定索引存储节点后, 发送查询请求; 一个或多个索引存储节点根据查询请求进行匹配, 得到符 合匹配的所有索引关系。 After the data query requesting node determines the index storage node according to the search attribute to be queried, the query request is sent; and one or more index storage nodes perform matching according to the query request to obtain all index relationships that match the matching.
一种对等网络中数据存储和查询的节点, 所述节点包括: 存储模块、 索引确定模块和查询模块, 其中, A node for data storage and query in a peer-to-peer network, the node includes: a storage module, an index determination module, and a query module, where
所述存储模块, 用于根据需要存储的数据的标识生成数据资源标识后, 将所述需要存储的数据存入数据存储节点; The storage module is configured to generate a data resource identifier according to the identifier of the data that needs to be stored, Depositing the data to be stored into a data storage node;
所述索引确定模块, 用于根据数据的各个搜索属性确定索引存储节点 , 将数据资源标识或数据标识, 以及所述搜索属性的索引关系存入所述索引 存储节点; The index determining module is configured to determine an index storage node according to each search attribute of the data, and store the data resource identifier or the data identifier and the index relationship of the search attribute into the index storage node;
所述查询模块, 用于查询数据时, 根据搜索属性从索引存储节点查询 到索引关系后, 根据其中的数据资源标识或数据标识查询获得对应的数据。 The query module, when used for querying data, queries the index storage node according to the search attribute to the index relationship, and obtains corresponding data according to the data resource identifier or the data identifier query.
本发明实施例所提供的对等网络中数据存储和查询的方法、 节点及系 统, 根据需要存储的数据的标识生成数据资源标识后, 将所述需要存储的 数据存入数据存储节点; 根据所述数据的各个搜索属性确定索引存储节点 , 将数据资源标识或数据标识, 以及所述搜索属性的索引关系存入所述索引 存储节点; 查询数据时, 根据搜索属性从所述索引存储节点查询到索引关 系后, 根据其中的数据资源标识或数据标识查询获得对应的数据。 能够将 索引数据分散的存储在 P2P网络的不同的节点中, 不再局限于存储在超级 节点中, 提高了存储和查询的分散性; 在进行条件查询时只查询相关的一 个或少数几个节点, 查询效率比较高。 附图说明 The method, the node, and the system for storing and querying the data in the peer-to-peer network provided by the embodiment of the present invention, after generating the data resource identifier according to the identifier of the data to be stored, storing the data to be stored in the data storage node; Determining, by the index storage node, the data storage identifier or the data identifier, and the index relationship of the search attribute are stored in the index storage node; when querying the data, querying from the index storage node according to the search attribute After the index relationship, the corresponding data is obtained according to the data resource identifier or the data identifier query. The index data can be stored in different nodes of the P2P network, and is no longer limited to being stored in the super node, which improves the decentralization of storage and query; only one or a few nodes are queried when performing conditional query. , the query efficiency is relatively high. DRAWINGS
图 1为现有技术的数据存储的流程示意图; 1 is a schematic flow chart of data storage in the prior art;
图 2为现有技术的数据查询的流程示意图; 2 is a schematic flowchart of a data query in the prior art;
图 3 为本发明实施例一种对等网络中数据存储和查询的方法流程示意 图; 3 is a schematic flow chart of a method for storing and querying data in a peer-to-peer network according to an embodiment of the present invention;
图 4为本发明实施例一中数据存储的流程示意图; 4 is a schematic flowchart of data storage in Embodiment 1 of the present invention;
图 5为本发明实施例一中数据查询的流程示意图; FIG. 5 is a schematic flowchart of data query in Embodiment 1 of the present invention; FIG.
图 6为本发明实施例一中数据删除的流程示意图; 6 is a schematic flowchart of data deletion in Embodiment 1 of the present invention;
图 7为本发明实施例一的网络结构示意图; FIG. 7 is a schematic structural diagram of a network according to Embodiment 1 of the present invention; FIG.
图 8 为本发明实施例一种对等网络中数据存储和查询的系统结构示意 图; FIG. 8 is a schematic structural diagram of a system for storing and querying data in a peer-to-peer network according to an embodiment of the present invention; Figure
图 9为本发明实施例一种对等网络中数据存储和查询的节点结构示意 图。 具体实施方式 FIG. 9 is a schematic structural diagram of a node for data storage and query in a peer-to-peer network according to an embodiment of the present invention. detailed description
本发明实施例的基本思想是: 根据需要存储的数据的标识生成数据资 源标识后, 将所述需要存储的数据存入数据存储节点; 根据所述数据的各 个搜索属性确定索引存储节点, 将数据资源标识或数据标识, 以及所述搜 索属性的索引关系存入所述索引存储节点; 查询数据时, 根据搜索属性从 所述索引存储节点查询到索引关系后, 根据其中的数据资源标识或数据标 识查询获得对应的数据。 The basic idea of the embodiment of the present invention is: after generating the data resource identifier according to the identifier of the data to be stored, storing the data to be stored in the data storage node; determining an index storage node according to each search attribute of the data, and The resource identifier or the data identifier, and the index relationship of the search attribute are stored in the index storage node; when querying the data, after querying the index relationship from the index storage node according to the search attribute, according to the data resource identifier or the data identifier therein The query obtains the corresponding data.
下面结合附图和具体实施例对本发明的技术方案进一步详细阐述。 图 3 为本发明实施例一种对等网络中数据存储和查询的方法流程示意 图, 如图 3所示, 所述方法具体包括以下步驟: The technical solutions of the present invention are further elaborated below in conjunction with the accompanying drawings and specific embodiments. FIG. 3 is a schematic flowchart of a method for storing and querying data in a peer-to-peer network according to an embodiment of the present invention. As shown in FIG. 3, the method specifically includes the following steps:
步驟 301 ,根据需要存储的数据的标识生成数据资源标识后, 将所述需 要存储的数据存入数据存储节点; Step 301: After generating the data resource identifier according to the identifier of the data to be stored, storing the data to be stored in the data storage node.
具体的, 所述根据需要存储的数据的标识生成数据资源标识, 具体为: 根据需要存储的数据的唯一标识, 进行哈希运算生成数据资源标识。 所述 将所述需要存储的数据存入数据存储节点,具体为:根据网络所采用的 P2P 算法确定数据存储节点, 然后将数据存入数据存储节点中。 Specifically, the generating the data resource identifier according to the identifier of the data to be stored, specifically: performing a hash operation to generate the data resource identifier according to the unique identifier of the data to be stored. The storing the data to be stored in the data storage node, specifically: determining a data storage node according to a P2P algorithm adopted by the network, and then storing the data in the data storage node.
步驟 302,根据所述数据的各个搜索属性确定索引存储节点, 将数据资 源标识或数据标识, 以及所述搜索属性的索引关系存入所述索引存储节点; 具体的, 所述搜索属性包括: 属性名称和属性值。 所述确定的索引存 储节点, 包括: 针对各个单独的搜索属性预设的一个或多个索引存储节点; 或者根据各个单独的搜索属性的属性名生成一个或多个属性资源标识, 然 后根据 P2P算法确定的一个或多个索引存储节点。 其中, 一种属性的索引 关系可以存储在一个索引存储节点上, 也可以存储在多个索引存储节点上。 需要进一步说明的是, 多个数据同一属性的索引关系可以分散存储在 几个节点上, 以降低单个索引存储节点的负担。 当索引数据量比较小时, 可以将同一属性的索引关系只存储在一个节点上, 此时属性资源标识直接 通过属性名产生即可。 Step 302: Determine an index storage node according to each search attribute of the data, and store the data resource identifier or the data identifier and the index relationship of the search attribute into the index storage node. Specifically, the search attribute includes: Name and attribute value. Determining the index storage node, comprising: one or more index storage nodes preset for each individual search attribute; or generating one or more attribute resource identifiers according to attribute names of the individual search attributes, and then according to the P2P algorithm One or more index storage nodes identified. Where an index of an attribute Relationships can be stored on an index storage node or on multiple index storage nodes. It should be further noted that the index relationship of the same attribute of multiple data can be distributed and stored on several nodes to reduce the burden of a single index storage node. When the amount of index data is small, the index relationship of the same attribute can be stored only on one node. At this time, the attribute resource identifier can be directly generated by the attribute name.
步驟 303 , 查询数据时,根据搜索属性从所述索引存储节点查询到索引 关系后, 根据其中的数据资源标识或数据标识查询获得对应的数据。 Step 303: When querying data, querying the index relationship from the index storage node according to the search attribute, and obtaining corresponding data according to the data resource identifier or the data identifier query therein.
具体的, 所述根据搜索属性从所述索引存储节点查询到索引关系, 包 括: 根据待查询的搜索属性确定索引存储节点后, 发送索引查询请求; 一 个或多个索引存储节点根据查询请求进行匹配, 得到符合匹配的所有索引 关系。 其中所述匹配方式可以为模糊匹配。 所述确定的索引存储节点, 包 括: 针对各个单独的搜索属性预设的一个或多个索引存储节点; 或者根据 各个单独的搜索属性的属性名生成一个或多个属性资源标识,然后根据 P2P 算法确定的一个或多个索引存储节点。 所述根据其中的数据资源标识或数 据标识查询获得对应的数据, 具体为: 根据各个索引关系中的数据资源标 识或数据标识确定各数据存储节点, 然后从各数据存储节点获取查询得到 的数据。 Specifically, the querying the index relationship from the index storage node according to the search attribute includes: sending an index query request after determining an index storage node according to the search attribute to be queried; and one or more index storage nodes matching according to the query request , get all the index relationships that match the match. The matching manner may be a fuzzy matching. The determined index storage node includes: one or more index storage nodes preset for each individual search attribute; or one or more attribute resource identifiers according to attribute names of respective individual search attributes, and then according to a P2P algorithm One or more index storage nodes identified. The obtaining the corresponding data according to the data resource identifier or the data identifier query is specifically: determining each data storage node according to the data resource identifier or the data identifier in each index relationship, and then obtaining the data obtained by the query from each data storage node.
进一步的, 当指定的数据需要删除时, 所述方法还包括: 根据所述指 定的数据的标识生成数据资源标识后, 将删除请求发送给数据存储节点; 数据存储节点删除所述数据, 根据所述数据的各搜索属性分别向各索引存 储节点发送删除索引请求; 各索引存储节点接到删除索引请求后, 删除对 应的索引关系。 其中, 删除所述数据可以在发送删除索引请求之前, 也可 以在收到索引关系已删除之后。 Further, when the specified data needs to be deleted, the method further includes: after generating the data resource identifier according to the identifier of the specified data, sending the deletion request to the data storage node; the data storage node deleting the data, according to the Each search attribute of the data respectively sends a delete index request to each index storage node; after receiving the delete index request, each index storage node deletes the corresponding index relationship. The data may be deleted before the delete index request is sent, or after the index relationship is deleted.
进一步的, 所述方法的各步驟中, 各个节点根据接收的消息进行处理 后, 还包括将处理的结果返回给发送消息的节点。 其中, 需要特别说明的 是步驟 102 中, 所述索引存储节点存储所述索引关系成功后, 向发送数据 存储请求的节点返回成功结果, 所述发送数据存储请求的节点进一步还可 以将所述索引关系发送到数据存储节点中进行保存, 以方便后续进一步对 索引关系进行维护。 Further, in each step of the method, after each node performs processing according to the received message, the method further includes returning the result of the processing to the node that sends the message. Which requires special instructions In step 102, after the index storage node stores the index relationship successfully, the node returns a success result to the node that sends the data storage request, and the node that sends the data storage request may further send the index relationship to the data storage node. Save it in order to facilitate further maintenance of the index relationship.
以下通过具体的实施例对上述方法进行进一步阐述。 The above method will be further elaborated below by way of specific examples.
图 4为本发明实施例一中数据存储的流程示意图, 如图 4所示, 所述 存储流程中数据存储请求节点根据数据唯一标识, 将数据存储在 P2P网络 中; 该数据有两个属性需要支持条件查询: 属性 1、 属性 2, 因此需要针对 这两个属性建立索引, 即根据属性 1的名称和属性 2的名称分别产生索引 数据标识, 或者根据属性与索引存储节点对应关系的配置, 将其索引关系 存储在 P2P网络中, 并假设每个属性的索引存储节点数为 3 , 具体流程为: 步驟 401 , 数据存储请求节点 (设为节点 8 )将数据 1的唯一标识经哈 希运算得到其资源标识, 称为数据资源标识; 4 is a schematic flowchart of data storage in the first embodiment of the present invention. As shown in FIG. 4, the data storage request node in the storage process stores data in a P2P network according to a unique identifier of the data; the data has two attributes required Support conditional query: Attribute 1, Attribute 2, so you need to index these two attributes, that is, generate the index data identifier according to the name of Attribute 1 and the name of Attribute 2, or according to the configuration of the attribute and the corresponding relationship of the index storage node. The index relationship is stored in the P2P network, and the number of index storage nodes of each attribute is assumed to be 3. The specific process is as follows: Step 401: The data storage request node (set to node 8) obtains the unique identifier of the data 1 by hash operation. Its resource identifier is called a data resource identifier.
步驟 402,数据存储请求节点 8根据网络所采用的 P2P算法将数据存储 在该数据的负责节点 (设为节点 3 ), 即数据存储节点 3; Step 402, the data storage request node 8 stores data according to the P2P algorithm used by the network in the responsible node of the data (set to node 3), that is, the data storage node 3;
步驟 403 ,数据存储节点 3将存储请求中的数据存储下来, 并向数据存 储请求节点 8返回结果; Step 403, the data storage node 3 stores the data in the storage request, and returns the result to the data storage request node 8;
步驟 404, 数据存储请求节点 8取 3以内的随机数(例如 2 ), 将属性 1 的名称与字符 "2" 拼接, 生成一个标识字符串, 对其进行哈希运算后得到 属性资源标识; Step 404, the data storage request node 8 takes a random number within 3 (for example, 2), splices the name of the attribute 1 with the character "2", generates an identification string, and hashes the attribute resource identifier;
步驟 405 , 数据存储请求节点 8根据网络所采用的 P2P算法, 将数据 1 的属性 1的索引关系, 存储在索引存储节点 (设为节点 9 ); Step 405: The data storage requesting node 8 stores the index relationship of the attribute 1 of the data 1 in the index storage node (set to node 9) according to the P2P algorithm used by the network;
具体的, 索引关系至少包括: 数据 1 的数据资源标识或数据标识、 即 数据 1的唯一标识, 以及属性 1的值。 Specifically, the index relationship includes at least: a data resource identifier or a data identifier of the data 1, that is, a unique identifier of the data 1, and a value of the attribute 1.
步驟 406, 索引存储节点 9存储数据的属性 1的索引关系, 并向数据存 储请求节点 8返回响应; Step 406, the index storage node 9 stores the index relationship of the attribute 1 of the data, and saves the data to the data. The storage request node 8 returns a response;
步驟 407 , 数据存储请求节点 8取 3以内的随机数(例如 1 ), 将属性 2 名称与字符 "1" 拼接, 生成一个标识字符串, 对其进行哈希运算后得到属 性资源标识; Step 407: The data storage request node 8 takes a random number (for example, 1) within 3, splices the attribute 2 name with the character "1", generates an identification string, and performs a hash operation to obtain the attribute resource identifier;
步驟 408 , 数据存储请求节点 8根据网络采用的 P2P所算法, 将数据 1 的属性 2的索引关系, 存储在索引存储节点 (设为节点 20 ); Step 408, the data storage requesting node 8 stores the index relationship of the attribute 2 of the data 1 in the index storage node (set to the node 20) according to the P2P algorithm adopted by the network;
具体的, 索引关系至少包括: 数据 1 的数据资源标识或数据标识、 即 数据 1的唯一标识, 以及属性 2的值。 Specifically, the index relationship includes at least: a data resource identifier or a data identifier of the data 1, that is, a unique identifier of the data 1, and a value of the attribute 2.
步驟 409, 索引存储节点 20存储数据的属性 2的索引关系, 并向数据 存储请求节点 8返回响应。 Step 409, the index storage node 20 stores the index relationship of the attribute 2 of the data, and returns a response to the data storage request node 8.
进一步的, 通过选取不同的随机数和属性名称进行组合, 可以针对同 一个属性名生成多个属性资源标识, 这样可以把同一属性名的索引关系存 储在多个节点上。 例如, 属性 1的名称结合 3以内的随机数生成三个标识 字符串分别为: 属性 1名称 + i (i=0,l,2), 对其进行哈希运算后得到三个属 性资源标识,分别对应索引存储节点 1、索引存储节点 9、索引存储节点 16, 即属性 1的索引关系分别存储在索引存储节点 1、 索引存储节点 9、 索引存 储节点 16中。 Further, by selecting different random numbers and attribute names for combination, multiple attribute resource identifiers can be generated for the same attribute name, so that the index relationship of the same attribute name can be stored on multiple nodes. For example, the name of the attribute 1 combined with the random number within 3 generates three identification strings: attribute 1 name + i (i=0, l, 2), which is hashed to obtain three attribute resource identifiers. Corresponding to the index storage node 1, the index storage node 9, and the index storage node 16, respectively, that is, the index relationship of the attribute 1 is stored in the index storage node 1, the index storage node 9, and the index storage node 16, respectively.
进一步的, 索引存储节点完成索引关系的存储后, 向数据存储请求节 点返回响应, 数据存储请求节点 8可以将索引存储节点 (例如节点 9和节 点 20 ) 的信息也存入数据存储节点 3上, 以便维护时使用。 Further, after the index storage node completes the storage of the index relationship, the data storage request node returns a response, and the data storage request node 8 may also store the information of the index storage node (for example, node 9 and node 20) on the data storage node 3, For use in maintenance.
图 5为本发明实施例一中数据查询的流程示意图, 如图 5所示, 所述 查询流程中数据查询节点根据查询条件对应的属性及索引存储策略, 确定 该属性的一个或多个索引存储节点, 然后向这些索引存储节点查询满足条 件的索引关系, 再根据索引关系中的数据唯一标识或数据资源标识查询对 应的数据。 具体流程为: 步驟 501 , 数据查询请求节点 14针对待查询数据的属性 1设定查询条 件; FIG. 5 is a schematic flowchart of data query in the first embodiment of the present invention. As shown in FIG. 5, the data query node in the query process determines one or more index storages of the attribute according to the attribute and the index storage policy corresponding to the query condition. The node then queries the index storage nodes for the index relationship that satisfies the condition, and then queries the corresponding data according to the data unique identifier or the data resource identifier in the index relationship. The specific process is: Step 501: The data query requesting node 14 sets a query condition for the attribute 1 of the data to be queried.
步驟 502, 数据查询请求节点 14生成根据 3以内的随机数生成三个标 识字符串分别为: 属性 1名称 + i (i=0,l,2), 再对所述三个标识字符串进行 哈希运算得到三个属性资源标识, 根据网络采用的 P2P算法, 这三个属性 资源标识的负责节点分别为: 索引存储节点 1、 索引存储节点 9、 索引存储 节点 16; Step 502, the data query requesting node 14 generates three identifier strings according to the random number within 3, respectively: attribute 1 name + i (i=0, l, 2), and then performs the three identification strings. The Greek operation obtains three attribute resource identifiers. According to the P2P algorithm adopted by the network, the responsible nodes of the three attribute resource identifiers are: an index storage node 1, an index storage node 9, and an index storage node 16;
步驟 503 ,数据查询请求节点 14向索引存储节点 1发送索引查询请求; 步驟 504, 索引存储节点 1收到请求后,对本地存储的索引关系进行条 件匹配(如模糊匹配), 并向数据查询请求节点 14返回匹配结果; Step 503, the data query requesting node 14 sends an index query request to the index storage node 1; Step 504, after receiving the request, the index storage node 1 performs condition matching (such as fuzzy matching) on the locally stored index relationship, and requests the data query. Node 14 returns a matching result;
步驟 505 ,数据查询请求节点 14向索引存储节点 9发送索引查询请求; 步驟 506, 索引存储节点 9收到请求后,对本地存储的索引关系进行条 件匹配(如模糊匹配), 并向数据查询请求节点 14返回匹配结果; Step 505, the data query requesting node 14 sends an index query request to the index storage node 9; Step 506, after receiving the request, the index storage node 9 performs condition matching (such as fuzzy matching) on the locally stored index relationship, and requests the data query. Node 14 returns a matching result;
步驟 507,数据查询请求节点 14向索引存储节点 16发送索引查询请求; 步驟 508, 索引存储节点 16收到请求后, 对本地存储的索引关系进行 条件匹配(可以是模糊匹配), 并向数据查询请求节点 14返回匹配结果; 步驟 509, 综合所有索引存储节点返回的满足匹配条件的索引关系(也 可能为空或只有一条), 根据查询的需要从中选择某条或某些索引关系; 步驟 510, 数据查询请求节点 14将索引关系中的数据唯一标识经哈希 运算后得到数据资源标识; Step 507, the data query requesting node 14 sends an index query request to the index storage node 16; Step 508, after receiving the request, the index storage node 16 performs condition matching (may be fuzzy matching) on the locally stored index relationship, and queries the data. The requesting node 14 returns a matching result. Step 509: Synthesize an index relationship (or possibly one or only one) that satisfies the matching condition returned by all index storage nodes, and select a certain index or some index relationships according to the query requirement; Step 510: The data query requesting node 14 obtains the data resource identifier by hashing the unique identifier of the data in the index relationship;
进一步的, 如果索引关系中包括数据资源标识可以直接采用, 则不需 要执行步驟 510。 Further, if the data resource identifier is included in the index relationship, the step 510 is not required.
步驟 511 , 数据查询请求节点 14根据网络采用的 P2P算法向数据存储 节点 3发送数据查询请求; Step 511: The data query requesting node 14 sends a data query request to the data storage node 3 according to the P2P algorithm adopted by the network;
步驟 512, 数据存储节点 3根据请求读取对应的存储数据, 并将查询结 果返回给查询请求节点 14。 Step 512, the data storage node 3 reads the corresponding storage data according to the request, and queries the node. It is returned to the query requesting node 14.
图 6为本发明实施例一中数据删除的流程示意图, 如图 6所示, 当指 定数据(例如数据 1 )需要删除时, 需要将其相应的所有属性(例如: 属性 1、 属性 2 ) 的索引关系也删除。 具体流程为: 6 is a schematic flowchart of data deletion in the first embodiment of the present invention. As shown in FIG. 6, when data (for example, data 1) needs to be deleted, all corresponding attributes (for example, attribute 1, attribute 2) need to be deleted. The index relationship is also deleted. The specific process is:
步驟 601 , 数据删除请求节点 19对指定数据的唯一标识进行哈希运算 得到数据资源标识; Step 601: The data deletion requesting node 19 performs a hash operation on the unique identifier of the specified data to obtain a data resource identifier.
步驟 602, 数据删除请求节点 19根据网络采用的 P2P算法, 向数据存 储节点 3发送删除请求; Step 602, the data deletion requesting node 19 sends a deletion request to the data storage node 3 according to the P2P algorithm adopted by the network;
步驟 603, 数据存储节点 3收到删除请求后,针对属性 1生成三个标识 字符串: 属性 1名称 + i (i=0,l,2), 再将这三个标识字符串进行哈希运算得 到三个属性资源标识; Step 603, after receiving the deletion request, the data storage node 3 generates three identification strings for the attribute 1: attribute 1 name + i (i=0, l, 2), and then hashes the three identification strings. Obtain three attribute resource identifiers;
进一步的, 本步驟中的这三个属性资源标识, 也可以从数据存储节点 3 获得, 其由存储策略决定。 Further, the three attribute resource identifiers in this step may also be obtained from the data storage node 3, which is determined by the storage policy.
步驟 604,数据存储节点 3根据网络采用的 P2P算法,向索引存储节点 1、 索引存储节点 9、 索引存储节点 16发送删除属性 1的索引关系的请求。 Step 604: The data storage node 3 sends a request to delete the index relationship of the attribute 1 to the index storage node 1, the index storage node 9, and the index storage node 16, according to the P2P algorithm adopted by the network.
步驟 605 ,属性 1的三个属性资源标识的负责节点收到请求后将对应的 索引关系删除, 并向数据存储节点 3返回结果; Step 605: The responsible node of the three attribute resource identifiers of the attribute 1 deletes the corresponding index relationship after receiving the request, and returns the result to the data storage node 3;
步驟 606, 数据存储节点 3收到删除请求删除所述数据后, 针对属性 2 生成三个标识字符串: 属性 2名称 + i (i=0,l,2), 再将这三个标识字符串进 行哈希运算得到三个属性资源标识; Step 606: After receiving the deletion request to delete the data, the data storage node 3 generates three identification strings for the attribute 2: attribute 2 name + i (i=0, l, 2), and then the three identification strings Perform a hash operation to obtain three attribute resource identifiers;
进一步的, 本步驟中的这三个属性资源标识, 也可以从数据存储节点 3 获得, 其由存储策略决定。 Further, the three attribute resource identifiers in this step may also be obtained from the data storage node 3, which is determined by the storage policy.
步驟 607,数据存储节点 3根据网络采用的 P2P算法,向网络发送删除 属性 2的索引关系的请求, 相关索引存储节点收到请求后删除索引关系, 并向数据存储节点 3返回结果, 数据存储节点 3删除数据后, 向数据删除 请求节点 19返回删除结果。 Step 607: The data storage node 3 sends a request for deleting the index relationship of the attribute 2 to the network according to the P2P algorithm adopted by the network, and the related index storage node deletes the index relationship after receiving the request, and returns the result to the data storage node 3, and the data storage node 3 delete the data, delete the data The requesting node 19 returns the deletion result.
由上述三个流程示意图可知本发明实施例一的网络结构, 图 7 为本发 明实施例一的网络结构示意图, 如图 7所示, 节点 3为数据 1的存储节点; 节点 1、 节点 9和节点 16为数据 1的属性 1的索引存储节点; 节点 6、 节 点 11和节点 20为数据 1的属性 2的索引存储节点; 节点 8为数据存储请 求节点; 节点 14为数据查询请求节点; 节点 19为数据删除请求节点。 The network structure of the first embodiment of the present invention is shown in the above three flowcharts. FIG. 7 is a schematic diagram of a network structure according to Embodiment 1 of the present invention. As shown in FIG. 7, node 3 is a storage node of data 1, node 1, node 9 and Node 16 is an index storage node of attribute 1 of data 1; node 6, node 11 and node 20 are index storage nodes of attribute 2 of data 1; node 8 is a data storage request node; node 14 is a data query request node; node 19 Request a node for data deletion.
图 8 为本发明实施例一种对等网络中数据存储和查询的系统结构示意 图, 如图 8所示, 所述系统包括: 数据存储请求节点 81、数据存储节点 82、 索引存储节点 83和数据查询请求节点 84, 其中, FIG. 8 is a schematic structural diagram of a system for storing and querying data in a peer-to-peer network according to an embodiment of the present invention. As shown in FIG. 8, the system includes: a data storage request node 81, a data storage node 82, an index storage node 83, and data. Querying request node 84, wherein
所述数据存储请求节点 81 , 用于根据需要存储的数据的标识生成数据 资源标识后, 将所述需要存储的数据存入数据存储节点 82, 根据所述数据 的各个搜索属性确定索引存储节点 83 , 将数据资源标识或数据标识, 以及 所述搜索属性的索引关系存入所述索 I存储节点 83; The data storage requesting node 81 is configured to: after generating the data resource identifier according to the identifier of the data to be stored, storing the data to be stored in the data storage node 82, and determining the index storage node 83 according to each search attribute of the data. The data resource identifier or the data identifier, and the index relationship of the search attribute are stored in the storage node 83;
具体的, 所述数据存储请求节点 81根据需要存储的数据的标识生成数 据资源标识, 具体为: 数据存储请求节点 81根据需要存储的数据的唯一标 识, 进行哈希运算生成数据资源标识。 所述将所述需要存储的数据存入数 据存储节点 82,具体为:根据网络所采用的 P2P算法确定数据存储节点 82, 然后将数据存入数据存储节点 82中。 Specifically, the data storage requesting node 81 generates a data resource identifier according to the identifier of the data to be stored, and specifically: the data storage requesting node 81 performs a hash operation to generate a data resource identifier according to the unique identifier of the data to be stored. The data to be stored is stored in the data storage node 82. Specifically, the data storage node 82 is determined according to the P2P algorithm adopted by the network, and then the data is stored in the data storage node 82.
所述搜索属性包括: 属性名称和属性值。 所述确定的索引存储节点 83 , 包括: 针对各个单独的搜索属性预设的一个或多个索引存储节点 83; 或者 根据各个单独的搜索属性的属性名生成一个或多个属性资源标识, 然后根 据 P2P算法确定的一个或多个索引存储节点 83。 其中, 一种属性的索引关 系可以存储在一个索引存储节点 83上,也可以存储在多个索引存储节点 83 上。 The search attributes include: an attribute name and an attribute value. The determined index storage node 83 includes: one or more index storage nodes 83 preset for each individual search attribute; or generate one or more attribute resource identifiers according to attribute names of the respective individual search attributes, and then according to One or more index storage nodes 83 determined by the P2P algorithm. The index relationship of an attribute may be stored in an index storage node 83 or may be stored in multiple index storage nodes 83.
需要进一步说明的是, 多个数据同一属性的索引关系可以分散存储在 几个索引存储节点 83上, 以降低单个索引存储节点 83的负担。 当索引数 据量比较小时, 可以将同一属性的索引关系只存储在一个索引存储节点 83 上, 此时属性资源标识直接通过属性名产生即可。 It should be further explained that the index relationship of the same attribute of multiple data can be stored in a distributed manner. Several indexes are stored on the node 83 to reduce the burden on the single index storage node 83. When the index data volume is small, the index relationship of the same attribute can be stored only on one index storage node 83. At this time, the attribute resource identifier can be directly generated by the attribute name.
所述数据查询请求节点 84, 用于查询数据时, 根据搜索属性从所述索 引存储节点 83查询到索引关系后, 根据其中的数据资源标识或数据标识查 询获得对应的数据。 The data query requesting node 84, when used for querying data, queries the index storage relationship from the index storage node 83 according to the search attribute, and obtains corresponding data according to the data resource identifier or the data identifier query therein.
具体的, 所述数据查询请求节点 84根据搜索属性从所述索引存储节点 83查询到索引关系,包括:根据待查询的搜索属性确定索引存储节点 83后, 发送索引查询请求; 一个或多个索引存储节点 83根据查询请求进行匹配, 得到符合匹配的所有索引关系。 其中所述匹配方式可以为模糊匹配。 所述 确定的索引存储节点 83 , 包括: 针对各个单独的搜索属性预设的一个或多 个索引存储节点 83; 或者根据各个单独的搜索属性的属性名生成一个或多 个属性资源标识, 然后根据 P2P算法确定的一个或多个索引存储节点 83。 所述根据其中的数据资源标识或数据标识查询获得对应的数据, 具体为: 根据各个索引关系中的数据资源标识或数据标识确定各数据存储节点 82 , 然后从各数据存储节点 82获取查询得到的数据。 Specifically, the data query requesting node 84 queries the index storage node 83 to the index relationship according to the search attribute, including: after determining the index storage node 83 according to the search attribute to be queried, sending an index query request; one or more indexes The storage node 83 performs matching according to the query request, and obtains all index relationships that match the matching. The matching manner may be a fuzzy matching. The determined index storage node 83 includes: one or more index storage nodes 83 preset for each individual search attribute; or generate one or more attribute resource identifiers according to attribute names of the respective individual search attributes, and then according to One or more index storage nodes 83 determined by the P2P algorithm. The obtaining the corresponding data according to the data resource identifier or the data identifier query, specifically: determining each data storage node 82 according to the data resource identifier or the data identifier in each index relationship, and then obtaining the query from each data storage node 82. data.
进一步的, 所述系统还包括: 数据删除请求节点 85 , 用于当指定的数 据需要删除时, 根据所述指定的数据的标识生成数据资源标识后, 将删除 请求发送给数据存储节点 82; Further, the system further includes: a data deletion requesting node 85, configured to: after the specified data needs to be deleted, generate a data resource identifier according to the identifier of the specified data, and send the deletion request to the data storage node 82;
所述数据存储节点 82, 还用于删除所述数据, 根据所述数据的各搜索 属性分别向各索引存储节点 83发送删除索引请求; The data storage node 82 is further configured to delete the data, and send a delete index request to each index storage node 83 according to each search attribute of the data;
其中, 删除所述数据可以在发送删除索引请求之前, 也可以在收到索 引关系已删除之后。 The data may be deleted before the delete index request is sent, or after the received index relationship is deleted.
所述索引存储节点 83 , 还用于接到删除索引请求后, 删除对应的索引 关系。 进一步的, 所述系统中, 各个节点根据接收的消息进行处理后, 还包 括将处理的结果返回给发送消息的节点。 其中, 需要特别说明的是, 所述 索引存储节点 83存储所述索引关系成功后,向发送数据存储请求的节点 81 返回成功结果, 所述送数据存储请求的节点 81进一步还可以将所述索引关 系发送到数据存储节点 82中进行保存, 以方便后续进一步对索引关系进行 维护。 The index storage node 83 is further configured to delete the corresponding index relationship after receiving the delete index request. Further, in the system, after each node performs processing according to the received message, the method further includes returning the result of the processing to the node that sends the message. Specifically, the index storage node 83 returns a success result to the node 81 that sends the data storage request after the index relationship is successfully stored, and the node 81 that sends the data storage request may further further use the index. The relationship is sent to the data storage node 82 for storage to facilitate subsequent maintenance of the index relationship.
图 9为本发明实施例一种对等网络中数据存储和查询的节点结构示意 图, 如图 9所示, 所述节点包括: 存储模块 91、 索引确定模块 92和查询模 块 93 , 其中, FIG. 9 is a schematic structural diagram of a node for data storage and query in a peer-to-peer network according to an embodiment of the present invention. As shown in FIG. 9, the node includes: a storage module 91, an index determining module 92, and a query module 93, where
存储模块 91 , 用于根据需要存储的数据的标识生成数据资源标识后, 将所述需要存储的数据存入数据存储节点; The storage module 91 is configured to: after generating the data resource identifier according to the identifier of the data that needs to be stored, storing the data that needs to be stored into the data storage node;
索引确定模块 92, 用于根据数据的各个搜索属性确定索引存储节点, 将数据资源标识或数据标识, 以及所述搜索属性的索引关系存入所述索引 存储节点; The index determining module 92 is configured to determine, according to each search attribute of the data, an index storage node, and store the data resource identifier or the data identifier, and the index relationship of the search attribute into the index storage node;
查询模块 93 , 用于查询数据时, 根据搜索属性从索引存储节点查询到 索引关系后, 根据其中的数据资源标识或数据标识查询获得对应的数据。 The query module 93 is configured to query the data, and after querying the index relationship from the index storage node according to the search attribute, obtain corresponding data according to the data resource identifier or the data identifier query.
以上所述, 仅为本发明的较佳实施例而已, 并非用于限定本发明的保 护范围。 The above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention.
Claims
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201110204001.4 | 2011-07-20 | ||
| CN201110204001.4A CN102891872B (en) | 2011-07-20 | 2011-07-20 | The method and system of data storage and query in a kind of peer-to-peer network |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2013010432A1 true WO2013010432A1 (en) | 2013-01-24 |
Family
ID=47535236
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2012/077743 Ceased WO2013010432A1 (en) | 2011-07-20 | 2012-06-28 | Method, node and system for data storage and query in peer network |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN102891872B (en) |
| WO (1) | WO2013010432A1 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104572727A (en) * | 2013-10-22 | 2015-04-29 | 阿里巴巴集团控股有限公司 | Data querying method and device |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104809129B (en) * | 2014-01-26 | 2018-07-20 | 华为技术有限公司 | A kind of distributed data storage method, device and system |
| CN105488191A (en) * | 2015-12-03 | 2016-04-13 | 南京联成科技发展有限公司 | Data acquisition processing method and device based on big data information safety management operation and maintenance service platform |
| CN106126552B (en) * | 2016-06-16 | 2019-03-29 | 华中师范大学 | A kind of P2P Spatial data query method and system based on iDistance |
| CN108205561A (en) * | 2016-12-19 | 2018-06-26 | 北京国双科技有限公司 | data query system, method and device |
| CN110704418A (en) * | 2018-06-21 | 2020-01-17 | 北京果仁宝软件技术有限责任公司 | Block chain information query method, device and equipment |
| CN109885536B (en) * | 2019-02-26 | 2023-06-16 | 深圳众享互联科技有限公司 | Distributed data fragment storage and fuzzy search method |
| CN111193804B (en) * | 2020-01-02 | 2022-09-09 | 深圳市网心科技有限公司 | Distributed storage method and device, network node and storage medium |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6636854B2 (en) * | 2000-12-07 | 2003-10-21 | International Business Machines Corporation | Method and system for augmenting web-indexed search engine results with peer-to-peer search results |
| CN101442558A (en) * | 2008-12-26 | 2009-05-27 | 中国科学院计算技术研究所 | Method and system for providing index service for P2SP network |
| CN101860474A (en) * | 2009-04-08 | 2010-10-13 | 中兴通讯股份有限公司 | Resource information processing method and peer-to-peer network based on peer-to-peer network |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080097971A1 (en) * | 2006-10-18 | 2008-04-24 | Telcordia Applied Research Center Taiwan Company | Peer-to-peer based secondary key search method and system for cluster database |
| CN101072160B (en) * | 2007-06-14 | 2010-12-08 | 华为技术有限公司 | Management method, system and node of distributed virtual environment |
| CN101399765B (en) * | 2007-09-28 | 2011-04-13 | 华为技术有限公司 | Method and system for reducing hot node load in P2P network |
| CN101150489A (en) * | 2007-10-19 | 2008-03-26 | 四川长虹电器股份有限公司 | Resource share method based on distributed hash table |
| CN101355591A (en) * | 2008-09-12 | 2009-01-28 | 中兴通讯股份有限公司 | A P2P network and its scheduling method |
-
2011
- 2011-07-20 CN CN201110204001.4A patent/CN102891872B/en active Active
-
2012
- 2012-06-28 WO PCT/CN2012/077743 patent/WO2013010432A1/en not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6636854B2 (en) * | 2000-12-07 | 2003-10-21 | International Business Machines Corporation | Method and system for augmenting web-indexed search engine results with peer-to-peer search results |
| CN101442558A (en) * | 2008-12-26 | 2009-05-27 | 中国科学院计算技术研究所 | Method and system for providing index service for P2SP network |
| CN101860474A (en) * | 2009-04-08 | 2010-10-13 | 中兴通讯股份有限公司 | Resource information processing method and peer-to-peer network based on peer-to-peer network |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104572727A (en) * | 2013-10-22 | 2015-04-29 | 阿里巴巴集团控股有限公司 | Data querying method and device |
| CN104572727B (en) * | 2013-10-22 | 2018-09-28 | 阿里巴巴集团控股有限公司 | A kind of data query method and device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN102891872A (en) | 2013-01-23 |
| CN102891872B (en) | 2018-02-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN101753610B (en) | Distributed network structure method, device, system and task processing method | |
| WO2013010432A1 (en) | Method, node and system for data storage and query in peer network | |
| US7664742B2 (en) | Index data structure for a peer-to-peer network | |
| JP4938074B2 (en) | Resource location information request method, user node and server for the method | |
| CN103457999B (en) | A kind of P2P document transmission method based on the NDN network architecture | |
| US20050108368A1 (en) | Method and apparatus for representing data available in a peer-to-peer network using bloom-filters | |
| WO2011150830A1 (en) | Method and node for obtaining the content and content network | |
| CN104115146A (en) | Method for storing and searching tagged content items in a distributed system | |
| WO2010127618A1 (en) | System and method for implementing streaming media content service | |
| CN101510144B (en) | Distributed cache system based on distributed virtual machine manager and working method thereof | |
| CN102438020A (en) | Method, device and network system for content distribution in content distribution network | |
| CN102571936B (en) | Method, device and system for searching data | |
| WO2010025653A1 (en) | Searching information method, system, device, and vertical search engine register method | |
| CN101047550A (en) | Block structure of P2P network and its network set method | |
| CN103095587B (en) | A method for registration service, network group center control nodes and system | |
| CN103107944B (en) | A kind of content positioning method and routing device | |
| CN104376014B (en) | Resource issue and querying method in a kind of structured P 2 P network | |
| WO2013120412A1 (en) | Data download method, terminal, server and system | |
| CN100536422C (en) | Peer-to-peer network and its network resource inquiring method | |
| CN101917475B (en) | P2P (Peer-to-Peer) mode based PSRD (Program Support Requirements Document) universal service resource discovery method | |
| WO2014075426A1 (en) | Data updating method and web server | |
| CN101883101B (en) | Vaccine distributing method based on double-layer Chord ring network | |
| CN106970965A (en) | A kind of Novel Internet resource search method | |
| WO2010045859A1 (en) | System, apparatus and method of content nodes bidirectional clustering | |
| CN103118113A (en) | Peer-to-peer network and network resource location method thereof |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 12814142 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 12814142 Country of ref document: EP Kind code of ref document: A1 |