WO2011069387A1 - 一种网络节点及其数据查询方法和索引更新方法 - Google Patents

一种网络节点及其数据查询方法和索引更新方法 Download PDF

Info

Publication number
WO2011069387A1
WO2011069387A1 PCT/CN2010/077540 CN2010077540W WO2011069387A1 WO 2011069387 A1 WO2011069387 A1 WO 2011069387A1 CN 2010077540 W CN2010077540 W CN 2010077540W WO 2011069387 A1 WO2011069387 A1 WO 2011069387A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
query
index information
index
information
Prior art date
Application number
PCT/CN2010/077540
Other languages
English (en)
French (fr)
Inventor
王洪波
林昕
周扬
程时端
王文东
Original Assignee
北京邮电大学
中兴通讯股份有限公司
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 北京邮电大学, 中兴通讯股份有限公司 filed Critical 北京邮电大学
Publication of WO2011069387A1 publication Critical patent/WO2011069387A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks

Definitions

  • Network node data query method and index update method thereof
  • the present invention relates to the field of telecommunication network data communication, and in particular to an unstructured point-to-point
  • P2P Point-to-Peer Nodes in the network and their data query methods and index update methods.
  • P2P technology is now widely used in the Internet.
  • P2P is widely used on the Internet as a mature technology. Due to the geographical dispersion of the end users on the Internet, the uncontrollable user behavior, and the heterogeneity of the network in which the terminal is located, most of the current Internet-based P2P network topologies are used, such as centralized management servers.
  • P2P and fully distributed P2P based on Distributed Hash Table (DHT) technology are used.
  • DHT Distributed Hash Table
  • host nodes have properties that are distinct from those in the Internet.
  • a host node In a telecommunication network, a host node has characteristics of high computing and storage performance, small number of nodes, rich network bandwidth resources, long online time, and stability.
  • the traditional structured P2P mode In the telecommunication network environment, if the traditional structured P2P mode is used to organize the host nodes, a large amount of unnecessary maintenance performance overhead will be introduced. Therefore, in the telecommunication network, the unstructured P2P mode is a comparative optimization. s Choice.
  • Existing unstructured P2P methods use flooding or Gossip (a distributed protocol) to maintain their network topology and perform data query operations. This non-directional message mechanism will also bring a lot of unnecessary network and performance overhead to the system.
  • the main object of the present invention is to provide a node in an unstructured P2P network, a data query method thereof, and an index update method, so as to improve query efficiency and reduce network load.
  • the present invention provides a data query method for a non-structured point-to-point (P2P) network, the method comprising: setting an index unit for each node of an unstructured P2P network, and updating the index unit in real time,
  • the index unit includes index information; and the query initiating node acquires target node information having target data by using index information of the index unit of the node, and initiates a data request to the target node.
  • the index information of the index unit includes direct index information of a prior query and/or indirect index information that is queried later, the direct index information includes target node information, and the indirect index information is used for a node index unit from which the indirect index information is recorded. Get direct index information.
  • the step of the query initiating node acquiring the target node information with the target data by using the index information of the index unit of the node includes: querying the initiating node to first query the direct index information of the target data, and initiating a direct index to the target node according to the directly indexed information that is queried And when the direct index is successful, the query initiation node updates the timestamp of the direct index information according to the direct index to the current time; when the direct index fails, the query initiation node deletes the direct index information according to the direct index, and the corresponding target The node associates the query originating node with the target data and inserts it into the indirect index information of the target node.
  • the step of the query initiating node acquiring the target node information with the target data by using the index information of the index unit of the node includes: querying the initiating node to query the indirect index information of the target data when there is no direct index information of the target data or the direct index fails.
  • the directional query node associated with the queried indirect index information initiates an indirect index;
  • the query initiating node inserts the node information into the direct index information and deletes the corresponding indirect index information.
  • the query initiating node deletes the related content of the indirect index information, and the corresponding directed query node initiates the query.
  • the information of the node is inserted into the indirect index information of the directed query node.
  • the query initiating node inserts the node information of the direct index information, where the node information includes three cases: when the related direct index information of the directed query node is valid, the node information is directly directed to the query node. Node information related to the target data in the index information; when the related direct index information of the node information is valid and the fixed point query node stores the target data, the node information is a node related to the target data in the direct index information of the directional query node The information and the node information of the fixed-point query node; when the node information has no relevant direct index information but the fixed-point query node stores the target data, the node information is node information of the directional query node.
  • the method further includes: when the index unit of the query initiating node has no direct index information and indirect index information of the target data, or the indirect index of the query initiating node fails, the query The initiating node sends a broadcast query message to other nodes; the node having the target data sends a response message to the query initiating node; and the query initiating node records the node information of the node that sent the response message to the direct index information, and the node that does not send the response message will The association of the initiating node and the target data is inserted into the indirect index information of the node that sent the response message.
  • the method further includes: when the node of the unstructured P2P network deletes the index information in the index information, broadcasts a delete message to other nodes, and the node that receives the delete message updates or deletes the index information.
  • the real-time update of each node to its own index unit is a self-learning real-time update that records the query actions of other nodes on the direct index information and/or the indirect index information.
  • the present invention further provides a self-learning index updating method for a non-structured point-to-point (P2P) network, the method comprising: setting an index unit for each node of an unstructured P2P network, the index unit including an index Information; and each node updates the index information according to the related query action, thereby self-study updating the index unit in real time.
  • P2P point-to-point
  • the index information of the index unit includes direct index information and target index information, where the direct index information includes target node information, and the indirect index information is used to obtain direct index information from a node index unit of the record;
  • the self-learning Real-time updates include updates to direct index information and updates to indirect index information.
  • the updating of the direct index information includes: when the query initiating node queries the direct index information of the target data and directly indexes the target node, the query initiating node updates the timestamp of the corresponding direct index information to the current time; when the direct index fails The query initiation node deletes the corresponding direct index information; the query initiation node does not query the direct index information of the target data or the direct index fails, and the indirect index information of the target data is queried, and the directional query related to the indirect index information of the query is queried When the node initiates the indirect indexing, the query initiating node inserts the node information into the direct index information and deletes the related content of the indirect index information; when the query initiating node sends the broadcast query message, and the node with the target data sends the response message to the query initiating node, The query initiating node records the node information of the node that sends the response message to the direct index information; and when the node deletes the index information in the index unit and broadcasts the delete message,
  • the indirect index information update includes: when the query initiating node queries the direct index information of the target data and directly indexes the target node, the target node associates the query initiating node with the target data and inserts into the indirect index information of the target node. ;
  • the query initiating node does not query the direct index information of the target data or the direct index fails, and the indirect index information of the target data is queried, and the indirect index is successfully initiated to the directed query node related to the indirect index information
  • the query initiating node deletes the indirect Relevant content of the index information; when the indirect index fails, the query initiating node deletes the related content of the indirect index information; when the indirect index fails, the directed query node inserts the information of the query initiating node into the indirect index information of the directed query node;
  • the node sends a broadcast query message, the node without the target data inserts the association between the query originating node and the target data into the indirect index information without the target data; when a node deletes the index information
  • the update unit of the index unit is updated in real time, and the update unit is configured to: record a node-related query action in the index information of the index unit.
  • the node further includes: a data requesting unit, configured to: when the local node serves as a query initiating node, acquire target node information having target data through the index information, and initiate a data request to the target node.
  • the index information of the index unit includes direct index information of a prior query and indirect index information that is queried later, the direct index information includes target node information, and the indirect index information is used to obtain from a node index unit of the record thereof.
  • Direct indexing information the data requesting unit is configured to initiate a data request to the target node by initiating a direct index to the target node by direct indexing information and/or indirectly indexing the directed querying node by indirect indexing information.
  • the updating unit includes: a direct index information updating unit, which is set to: when the direct index is successful, the corresponding direct cable The timestamp of the information is updated to the current time; when the direct index fails, the corresponding direct index information is deleted; and when the indirect index is successful, the node information of the target node is inserted into the direct index information.
  • a direct index information updating unit which is set to: when the direct index is successful, the corresponding direct cable The timestamp of the information is updated to the current time; when the direct index fails, the corresponding direct index information is deleted; and when the indirect index is successful, the node information of the target node is inserted into the direct index information.
  • the update unit includes: an indirect index information update unit, configured to: when the node is a target node, when the direct index fails, the query initiation node is associated with the target data and inserted into the indirect index information of the target node; When the node is a query initiation node, when the indirect index is successful, the node information of the target node is inserted into the direct index information and the corresponding indirect index information is deleted; when the node is a query initiation node, when the indirect index fails, The related content of the indirect index information is deleted; when the node is a directed query node, when the indirect index fails, the node information of the query initiating node is inserted into the indirect index information of the directed query node.
  • an indirect index information update unit configured to: when the node is a target node, when the direct index fails, the query initiation node is associated with the target data and inserted into the indirect index information of the target node; When the node is a query initiation node, when the indirect index is successful, the
  • the node further includes: a broadcast unit, configured to: when the node is a query initiation node, and the index unit of the query initiation node has no direct index information and indirect index information of the target data or the query initiation node is indirectly When the index fails, the broadcast query message is sent to the other node; the direct index information update unit included in the update node is set to: when the node is the query initiation node, record the node information of the broadcast query response with the target data to the direct index information;
  • the indirect index information updating unit included in the update node is set to: when the node is a node having no target data, insert the association of the query initiating node and the target data into the indirect index information of the node having no target data.
  • the broadcast unit is further configured to: when the node is a node that needs to delete target data, the node that needs to delete the target data deletes the target data, and then broadcasts a delete message to other nodes;
  • the direct index information update unit is further configured to When the node receives the node that deletes the message, the direct index information of the deleted target data is updated or deleted after receiving the delete message;
  • the indirect index information update unit is further configured to: when the node receives the delete message At the time of the node, the indirect index information of the deleted target data is updated or deleted after receiving the delete message.
  • the node further includes: a deleting unit, configured to: in the case that the index unit storage space is full, the indirect The entry of the index information is randomly deleted to insert a new entry;
  • the invention provides a method for querying data by using index information and real-time updating index information in an unstructured P2P network, thereby improving query efficiency and reducing network load.
  • FIG. 1 is a schematic flowchart of a data query method for an unstructured P2P network according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a process for querying no index information data in a data query method for an unstructured P2P network according to the present embodiment
  • FIG. 4 is a schematic diagram of a data query process in a data query method for a non-structured P2P network in a data query method of an unstructured P2P network
  • 5 is a schematic diagram of a data deletion process in a data query method of an unstructured P2P network according to the embodiment
  • Fig. 6 is a schematic structural view of an unstructured P2P network system of the present embodiment.
  • the present invention relates to an unstructured P2P network, including a plurality of nodes constituting an autonomous domain, each node of the autonomous domain is provided with an index unit, and is updated in real time.
  • the index unit includes a direct request for priority query?
  • the information and the indirect index information that is queried later, the query initiating node in the autonomous domain acquires direct index information of the target data through the index unit of the node and initiates a data request to the target node.
  • the data query method in the example introduces the node's own resources into the index selection mechanism, and the selection mechanism is implemented by index information, using direct index information or indirect index information selection.
  • the index unit of each node in the autonomous domain in this embodiment records the action information about the query that has occurred in the past by direct index information or indirect index information, and provides local index information for subsequent data queries to minimize the non-directionality of the transmission. Messages, as well as flexible use of non-directional messages and directed query messages, enable fast and efficient data query, and also greatly reduce network bandwidth and performance overhead, thus solving network congestion problems.
  • An index unit is set on each node of the unstructured P2P network autonomous domain, and the index unit is updated in real time.
  • the index unit is an index table in the embodiment of the present invention. Of course, other forms that can implement the index information can be retrieved.
  • the content of the entry of the above index table is the mapping index information of the data request basic unit (hereinafter referred to as data block or target data) and other nodes in the local autonomous domain that may be related to the data block.
  • the contents of the entry are divided into two cases, including direct index information of the priority query and indirect index information of the later query.
  • the direct index information table item holds the target node information with the content of a certain data block and the timestamp of the most recent use of the table item. By directly indexing the information, the node storing the direct index information entry can directly initiate a data request to the target node.
  • the indirect index information table item stores one or more other node information, and the node or the direct index information table item having the data block or the data block; the node storing the indirect index information item may be indirectly indexed to the information item
  • the node in the node initiates a directed query request to obtain direct index information from the index unit of the node it records, and then performs a direct index operation to initiate a data request to the target node.
  • FIG. 1 is a schematic flowchart of data query and request in the embodiment, and the following is a description: Step S101: The query originating node needs to query target data, first check whether there is relevant direct index information in the local index table, and if so, according to Directly indexing information, directly initiating a data request to the target node (ie, the query initiating node initiates a direct index information data request), if the direct index information data request is successful, the process ends; step S102, if the query initiating node does not have relevant direct index information locally or If the direct index information data request fails, the query initiating node deletes the corresponding direct index information, and then views the local index.
  • Directly indexing information directly initiating a data request to the target node
  • directly initiating a direct index information data request ie, the query initiating node initiates a direct index information data request
  • the process ends step S102, if the query initiating node does not have relevant direct index information locally or If the direct index information data request fails
  • a directed query request is initiated to the directed query node of the indirect index information record. If the initiating node receives a valid node information that can initiate a data request, indicating that the indirect index data query is successful, the related node information is inserted into the direct index information of the index table, and the corresponding indirect index information is deleted. The direct index data request process is then triggered, that is, the process returns to step S101.
  • the initiating node does not receive the valid node information that can initiate the data request in a specific time, indicating that the indirect index data query fails, the corresponding indirect index information is deleted, and the broadcast query process is triggered, that is, step S103 is performed; Step S103;
  • the query originating node local index table does not record any related index information or the data request process through the index information fails, and the node sends a broadcast query message to other nodes in the autonomous domain.
  • the node receiving the broadcast query message checks whether it stores the target data, and if so, sends the own node information and/or the locally stored node index information related to the target data to the broadcast initiating node, and if not, does not respond and Inserting the broadcast initiating node into the local indirect index information; after a certain time, the broadcast initiating node inserts the received node information of the valid initiating data request into the local direct index information, and then triggers the direct index data request process, that is, Returning to step S101, the target data is finally obtained.
  • each node of the autonomous domain updates the self-learning real-time update of its own index unit in real time.
  • the index unit of each node in the same autonomous domain records the action information about the query in the past by direct or indirect index information, and provides local index information for subsequent data queries, so that the data query is more self-learning.
  • the data query method of this embodiment will be described in detail below.
  • FIG. 2 is a schematic diagram showing the process of searching for and requesting data by the query initiating node without relevant index information according to the present invention.
  • the query initiating node in the unstructured P2P network autonomous domain needs to find a target data that is not locally, if the query initiating node does not have any direct index information or indirect index information about the target data locally, the query initiating node goes to all the local autonomous domains.
  • the other nodes send a broadcast query message and then wait for other nodes to send a response message to the query originating node. described as follows:
  • the node that receives the broadcast query message in the local autonomous domain checks whether there is target data locally. If there is target data, it stores its own storage, network bandwidth, computing resources, load status, and locally stored data adjacent to the target data ( That is, the data information that the query initiating node may request next is sent back to the query initiating node as a response message; if the node that receives the broadcast query message does not have the target data locally, the broadcast query message is not responded, but the query initiating node is considered to be final.
  • the index information about the target data will be successfully obtained in some form, and each node that receives the broadcast query information associates the information of the query originating node with the requested data block, and adds it to the local indirect index information;
  • the query initiating node After waiting for a specific time, after receiving the valid response message returned by the other node, the query initiating node associates the node information that sends the response message with the relevant target data, records it into the local direct index information, and then filters out One or more most suitable nodes initiate a data request;
  • the requested node sends the target data to the query initiating node.
  • the above process is actually a process in which both the query originating node and the broadcast query node are learning in a query, thereby gradually accumulating and understanding the distribution of data in the autonomous domain.
  • the direct index information is preferentially queried, as follows:
  • the direct index information is used first.
  • the query initiating node uses the resource status information such as the peer bandwidth recorded in the past from the direct index information record. Select one or more target nodes and initiate a data communication request to them.
  • FIG. 3 and FIG. 3 which is a schematic diagram of a process in which the query initiating node uses the direct index information to search for and request data in the embodiment, and the description is as follows:
  • the initiating node in the autonomous domain needs the target data
  • one or more target nodes are selected in the local corresponding direct index information table to initiate a data request; 32. If the target node that receives the data request in the local autonomous domain detects that there is no target data locally, it sends a data request failure message to the query initiation node, and inserts the association information of the query initiation node and the target data into the local indirect index. In the information, the query initiating node deletes the direct index information corresponding to the failed query from the list after receiving the data request failure message;
  • the target node that receives the data request in the local autonomous domain responds to the data request if the local target data exists, and the query initiation node updates the timestamp in the direct index information table to the current time. If no node responds to the data request of the query originating node within a certain time, the query initiating node triggers the indirect index query process if there is indirect index information, and if there is no corresponding indirect index information, the broadcast query process is triggered to query the target. Data, in this process, you can no longer send broadcast messages to nodes that have failed previous queries, or you can send broadcast messages to all nodes except this node.
  • FIG. 4 is a schematic diagram showing the process of searching for and requesting data by using the indirect index information by the node in the embodiment, which is as follows:
  • the query originating node in the autonomous domain needs the target data, it selects one or more directed query nodes in the local corresponding indirect index information table to initiate a directed query request;
  • the directional query node that receives the directional query request in the local autonomous domain queries the node information related to the requested target data in the local direct index information table, and if the related direct index is still valid, sends the relevant node information to the query initiation node. If the directional query node also stores the target data locally, in this case, if there is valid information in the direct index table of the directional query node, the self information is sent to the query initiation node together with the node information in the direct index table, if If the directional query node has no relevant valid direct index information, it only sends its own information to the query initiation node.
  • the information of the query initiation node is inserted locally.
  • the data query failure message is sent to the query initiating node, and the query initiating node deletes the corresponding indirect index information entry after receiving the failure message;
  • the query initiating node After waiting for a specific time, if the query initiating node receives the valid node information, this will be The node information is inserted into the direct index information list, and the corresponding entry is deleted in the indirect index information table, and then one or more most suitable nodes are selected according to the returned node information to initiate a data request;
  • the target node that receives the data request in the autonomous domain initiates data transmission in response to the data request of the query initiation node if the target data is still stored locally;
  • the target node that receives the data request in the autonomous domain has no target data locally, sends a data request failure message to the query initiation node, and the query initiation node deletes the local related direct request I entry after receiving the data request failure message. . If the query initiating node does not receive valid node information or all the data requests fail, the broadcast query process is triggered to query the target data. In this process, the broadcast message may not be sent to the node that failed the previous query. It is also possible to send a broadcast message to all nodes except this node.
  • FIG. 5 is a schematic diagram of a process for deleting a local data by a node in the present invention, and the description is as follows:
  • the node After a node in an unstructured P2P network autonomous domain reaches a certain threshold in the local storage space, the node sends a broadcast delete message to all other nodes in the autonomous domain, and notifies other nodes of the information of the deleted media content;
  • the node that receives the broadcast deletion message updates or deletes information about the broadcast deletion message sending node and related media content in the local learning information.
  • directly or indirectly indexing information update between the query initiating node and the target node or the directional query node if the index table storage space is full, first check the number of contents in the indirect index table entry. If the quantity exceeds a certain threshold, if it has been exceeded, the corresponding number of entries are randomly deleted in the indirect index entry to insert a new entry. If the content of the indirect index entry does not reach the threshold, in the direct index information entry, each entry has a corresponding timestamp, and the entry is inserted into the index information entry or used in the query process.
  • the corresponding timestamp of the entry is updated to the current time. Then, after the entry is sorted according to the timestamp, the entry that has not been used for the longest time is deleted to insert a new entry.
  • the data query method in this embodiment is applicable to a telecommunications network node autonomous domain, and the node in the telecommunication network has the characteristics of high computing and storage performance, small number of nodes, rich network bandwidth resources, long online time and stability, and the like.
  • the present embodiment can well avoid the hidden danger of network congestion caused by a large number of flooded messages in the unstructured P2P, and introduce the node's own resources into the selection mechanism, so that the system itself has a certain load balance.
  • Ability Please refer to FIG. 6.
  • FIG. 6 is a schematic structural diagram of the system according to the embodiment.
  • the unstructured P2P network of the present invention can be further modularized into an unstructured P2P network system.
  • the network system includes a number of nodes (10-1 to 10-N) constituting an autonomous domain.
  • Each node (10-1 ⁇ 10-N) is interconnected with each other through a network interface 62, each node including an index unit 64 with index information, a data request unit 66, an update unit 67 that self-study updates the index unit 64 in real time, broadcast Unit 68 and deletion unit 69.
  • the update unit 67 is configured to record the node-related query action in the index information of the index unit 64.
  • the index information of the index unit 64 includes the direct index information 641 of the previous query and the indirect index information 642 of the subsequent query.
  • the direct index information 641 includes target node information for obtaining direct index information from the node index unit of its record.
  • the data request operation of the data request unit 66 includes initiating a direct index to the target node via the direct index information 641 and/or initiating an indirect index to the directed query node via the indirect index information 642.
  • the update unit 67 includes a direct index information update unit 671 and an indirect index information update unit 672.
  • the index unit and the update unit may be combined together or separately.
  • the data requesting unit 66 is configured to: when the node is the query initiating node, acquire the target node information with the target data through the index information, and initiate a data request to the target node.
  • the direct index information updating unit 671 is configured to: when the direct index is successful, update the timestamp of the corresponding direct index information 641 to the current time, and when the direct index fails, delete the corresponding direct index information 641; when the indirect index is successful, The target node information is inserted into the direct index information 641.
  • the indirect index information updating unit 672 is configured to: associate the query initiating node with the target data and insert it into the indirect index information 642 of the target node when the direct index fails; insert the target node information into the direct index information when the indirect index is successful 641 and delete the related content of the indirect index information 642; when the indirect index fails, the related content of the indirect index information 642 is deleted, and the information of the query initiating node is inserted into the indirect index information 642 of the directed query node.
  • the broadcast unit 68 is configured to: when the index unit 64 of the query initiating node has no direct index information and indirect index information of the target data or the indirect index of the query initiating node fails, send a broadcast query message to other nodes.
  • the direct index information updating unit 671 is further configured to: record the node information of the broadcast query response to the direct index information.
  • the indirect index information updating unit 672 is further configured to: insert the association of the query initiating node and the target data into the indirect index information of the node that does not respond.
  • the broadcast unit 68 is further configured to: after the node deletes the target data, broadcasts the delete message to other nodes.
  • the direct index information update unit 671 is further configured to: update or delete the direct index information of the deleted target data after receiving the delete message.
  • the indirect index information updating unit 672 is further configured to: update or delete the indirect index information of the deleted target data after receiving the delete message.
  • the deleting unit 69 randomly deletes the entry of the indirect index information 642 to insert a new entry when the storage unit of the index unit 64 is full; and if the content of the indirect index information does not reach the threshold, The entry of the direct index information 641 is time-sorted, and the long-unused entry is deleted to insert a new entry.
  • the P2P network data query method and system of the present invention sets and updates the index unit in each node of the unstructured P2P network autonomous domain, and the query initiating node in the autonomous domain obtains the direct index of the target data through the index unit of the node.
  • the information is sent to the target node to initiate the data request, so that the node's own resources are introduced into the selection mechanism, and the index unit of each node in the same domain records the action information about the query that has occurred in the past by direct or indirect index information, for subsequent
  • the data query tries to provide local index information, minimizes the sending of non-directional messages, greatly saves network bandwidth and performance overhead, and solves network congestion problems;
  • the P2P network data query method and system of the present invention when the index unit does not update the direct index information and/or the indirect index information of the target data, or when the node in the autonomous domain deletes the data block, the broadcast query message and the broadcast are sent. Deleting non-directional messages such as messages, sending directional query information in indirect indexing, flexible data query mode, achieving efficient data query positioning, and effectively improving data query efficiency and hit rate among nodes in the autonomous domain;
  • the P2P network data query method and system of the present invention implements updating and maintaining a direct and indirect index information through each node in the domain, introducing the node's own resources into the selection mechanism, and distributing the index resources to multiple nodes, so that the system It has a certain load balancing capability;
  • the P2P network data query method and system of the present invention uses an unstructured P2P mode in a telecommunication network, because in a telecommunication network, a host node has high computing and storage performance, a small number of nodes, a rich network bandwidth resource, and an online time. Long and stable features, abandoning traditional structured P2P will reduce a lot of unnecessary maintenance performance overhead;
  • each node of the autonomous domain updates the self-learning unit in real time to the self-learning real-time update of the involved nodes, and the index unit of each node in the same domain will occur in the past.
  • the action information about the query is recorded by direct or indirect index information, and local index information is provided as much as possible for subsequent data queries, so that the data query is more Self-learning.
  • the present invention provides a method for querying data using an index information in an unstructured P2P network and updating the index information in real time, thereby improving query efficiency and reducing network load.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种无结构点对点(P2P)网络的数据查询方法,所述方法包括:无结构P2P网络的每个节点均设置索引单元,并实时更新该索引单元,所述索引单元包括索引信息;以及查询发起节点通过本节点的索引单元的索引信息获取具有目标数据的目标节点信息,并向目标节点发起数据请求。本发明还公开了一种无结构点对点(P2P)网络的自学性索引更新方法和一种无结构P2P网络系统中的节点。本发明提供了在无结构P2P网络下采用索引信息进行数据查询以及对索引信息进行实时更新的方法,提高了查询效率,减少了网络负载。

Description

一种网络节点及其数据查询方法和索引更新方法
技术领域 本发明涉及电信网络数据通信领域, 具体涉及一种无结构点对点
( Peer-to-Peer, P2P ) 网络中的节点及其数据查询方法、 索引更新方法。
背景技术
随着电信通信技术和多媒体业务的不断发展, 可靠性高的分布式存储的 P2P网络在电信网络得到越来越多的运用。
P2P技术在互联网中的应用现已极为广泛, 在文件下载、 文件共享、 分 布式存储以及视频流媒体等领域, P2P作为一种比较成熟的技术在互联网上 大规模地被应用。 由于互联网上的终端用户具有地理位置分散、 用户行为离 散不可控以及终端所处网络异质等特点, 目前在互联网上所使用的大都为结 构化的 P2P网络拓朴,如拥有统一管理服务器的集中式 P2P和基于分布式哈 希表(Distributed Hash Table, DHT )技术的全分布式 P2P。 但是在电信网络中, 主机节点具有与互联网中的终端截然不同的性质。 在电信网络中, 主机节点具有计算及存储性能高、 节点数量规模小、 网络带 宽资源丰富、 在线时间长且稳定等特性。 在电信网络环境下, 如果釆用传统 的结构化的 P2P方式将主机节点组织起来, 则将引入大量不必要的维护性能 开销, 因此在电信网络中, 用无结构的 P2P方式是一种比较优化的选择。 现有的无结构 P2P方式多釆用洪泛或是 Gossip (一种分布式协议)等机 制维护其网络拓朴以及进行数据查询等操作。 而这种无指向性的消息机制也 将给系统带来大量不必要的网络及性能开销。 特别是在高并发时段, 大量的 洪泛或 Gossip消息将可能阻塞整个网络, 导致网络瘫痪。 因此,现有的基于洪泛及 Gossip的维护与查询机制已经无法适应具有大 量数据查询请求的场景。 发明内容 本发明的主要目的是: 提供一种无结构 P2P网络中的节点及其数据查询 方法、 索引更新方法, 以提高查询效率, 减少网络负载。 为了解决上述问题, 本发明提供了一种无结构点对点 (P2P ) 网络的数 据查询方法, 所述方法包括: 无结构 P2P网络的每个节点均设置索引单元, 并实时更新该索引单元, 所述索引单元包括索引信息; 以及 查询发起节点通过本节点的索引单元的索引信息获取具有目标数据的目 标节点信息, 并向目标节点发起数据请求。 所述索引单元的索引信息包括在先查询的直接索引信息和 /或在后查询 的间接索引信息, 所述直接索引信息包括目标节点信息, 所述间接索引信息 用来从其记录的节点索引单元中获取直接索引信息。 查询发起节点通过本节点的索引单元的索引信息获取具有目标数据的目 标节点信息的步骤包括: 查询发起节点先查询目标数据的直接索引信息, 并根据查询到的直接索 引信息向目标节点发起直接索引; 以及 直接索引成功时, 查询发起节点将发起直接索引时依据的直接索引信息 的时间戳更新为当前时间; 直接索引失败时, 查询发起节点删除发起直接索引时依据的直接索引信 息, 对应的目标节点将查询发起节点与目标数据关联并插入到该目标节点的 间接索引信息中。 查询发起节点通过本节点的索引单元的索引信息获取具有目标数据的目 标节点信息的步骤包括: 查询发起节点在没有目标数据的直接索引信息或者直接索引失败时, 查 询目标数据的间接索引信息并向查询到的间接索引信息相关的定向查询节点 发起间接索引; 以及 在间接索引成功时, 查询发起节点将节点信息插入直接索引信息, 并删 除相应的间接索引信息; 在间接索引失败时, 查询发起节点删除间接索引信息的相关内容, 对应 的定向查询节点将查询发起节点的信息插入到该定向查询节点的间接索引信 息。 在间接索引成功时, 查询发起节点插入直接索引信息的节点信息的步骤 中, 所述节点信息包括三种情况: 当定向查询节点的相关直接索引信息有效时, 所述节点信息为定向查询 节点直接索引信息中与目标数据有关的节点信息; 当所述节点信息的相关直接索引信息有效并且定点查询节点存储有目标 数据时, 所述节点信息为定向查询节点直接索引信息中与目标数据有关的节 点信息以及定点查询节点的节点信息; 当所述节点信息没有相关直接索引信息但是定点查询节点存储有目标数 据时, 所述节点信息为定向查询节点的节点信息。 向目标节点发起数据请求的步骤之前, 所述方法还包括: 在所述查询发起节点的索引单元没有目标数据的直接索引信息和间接索 引信息时, 或者所述查询发起节点间接索引失败时, 查询发起节点向其它节 点发送广播查询消息; 具有目标数据的节点向查询发起节点发送响应消息; 以及 查询发起节点将发送响应消息的节点的节点信息记录到直接索引信息, 且没有发送响应消息的节点将查询发起节点和目标数据的关联插入到该发送 响应消息的节点的间接索引信息。 所述的方法, 其还包括: 无结构 P2P网络的节点在删除索引信息中的索 引信息时, 向其它节点广播删除消息, 收到删除消息的节点更新或删除索引 信息。 每个节点对自身索引单元的实时更新为将其它节点的查询动作记录在直 接索引信息和 /或间接索引信息上的自学习性实时更新。 为了解决上述问题, 本发明还提供了一种无结构点对点 (P2P ) 网络的 自学性索引更新方法, 所述方法包括: 无结构 P2P网络的每个节点均设置索引单元, 所述索引单元包括索引信 息; 以及 每个节点根据有关的查询动作更新索引信息中, 从而自学性实时更新所 述索引单元。
所述索引单元的索引信息包括直接索引信息和间接索引信息, 所述直接 索引信息包括目标节点信息, 所述间接索引信息用来从其记录的节点索引单 元中获取直接索引信息; 所述自学性实时更新包括直接索引信息的更新和间 接索引信息的更新。 所述直接索引信息的更新包括: 当查询发起节点查询到目标数据的直接索引信息并向目标节点直接索引 成功时, 查询发起节点将相应直接索引信息的时间戳更新为当前时间; 直接索引失败时, 查询发起节点删除相应直接索引信息; 在查询发起节点没有查询到目标数据的直接索引信息或者直接索引失 败, 且查询到目标数据的间接索引信息, 并向查询到的间接索引信息相关的 定向查询节点发起间接索引成功时, 查询发起节点将节点信息插入直接索引 信息并删除间接索引信息的相关内容; 当查询发起节点发送广播查询消息, 且具有目标数据的节点向查询发起 节点发送响应消息时, 查询发起节点将发送响应消息的节点的节点信息记录 到直接索引信息; 以及 一节点在删除索引单元中的索引信息并广播删除消息时, 收到删除消息 的节点更新或删除直接索引信息。 所述间接索引信息更新包括: 当查询发起节点查询到目标数据的直接索引信息并向目标节点直接索引 失败时, 目标节点将查询发起节点与目标数据关联并插入到本目标节点的间 接索引信息中; 在查询发起节点没有查询到目标数据的直接索引信息或者直接索引失 败, 且查询到目标数据的间接索引信息, 并向与间接索引信息相关的定向查 询节点发起间接索引成功时, 查询发起节点删除间接索引信息的相关内容; 在间接索引失败时, 查询发起节点删除间接索引信息的相关内容; 在间接索引失败时, 定向查询节点将查询发起节点的信息插入该定向查 询节点的间接索引信息; 查询发起节点发送广播查询消息时, 没有目标数据的节点将查询发起节 点和目标数据的关联插入到该没有目标数据的间接索引信息; 一节点在删除索引单元中的索引信息并广播删除消息时, 收到删除消息 的节点更新或删除间接索引信息。 为了解决上述问题,本发明还提供了一种无结构 P2P网络系统中的节点, 其包括: 具有索引信息的索引单元,
实时更新所述索引单元的更新单元, 更新单元设置为: 将节点有关的查 询动作记录在所述索引单元的索引信息中。 所述节点还包括: 数据请求单元, 其设置为: 当本节点作为查询发起节点时, 通过索引信 息获取具有目标数据的目标节点信息, 并向目标节点发起数据请求。
所述索引单元的索引信息包括在先查询的直接索引信息和在后查询的间 接索引信息, 所述直接索引信息包括目标节点信息, 所述间接索引信息用来 从其记录的节点索引单元中获取直接索引信息; 所述数据请求单元是设置为按如下方式向目标节点发起数据请求: 通过 直接索引信息向目标节点发起直接索引和 /或通过间接索引信息向定向查询 节点发起间接索引。 所述更新单元包括: 直接索引信息更新单元, 其设置为: 在直接索引成功时, 将相应直接索 引信息的时间戳更新为当前时间; 直接索引失败时,删除相应直接索引信息; 以及在间接索引成功时, 将目标节点的节点信息插入直接索引信息。 所述更新单元包括: 间接索引信息更新单元, 其设置为: 当所述节点为目标节点时, 在直接 索引失败时, 将查询发起节点与目标数据关联并插入到目标节点的间接索引 信息中; 当所述节点为查询发起节点时, 在间接索引成功时, 将目标节点的 节点信息插入直接索引信息并删除相应的间接索引信息; 当所述节点为查询 发起节点时, 在间接索引失败时, 删除间接索引信息的相关内容; 当所述节 点为定向查询节点时, 在间接索引失败时, 将查询发起节点的节点信息插入 定向查询节点的间接索引信息。 所述节点还包括: 广播单元, 其设置为: 当所述节点为查询发起节点, 且在所述查询发起 节点的索引单元没有目标数据的直接索引信息和间接索引信息或者所述查询 发起节点间接索引失败时, 向其它节点发送广播查询消息; 更新节点包括的直接索引信息更新单元设置为: 当所述节点为查询发起 节点, 将具有目标数据的广播查询响应的节点信息记录到直接索引信息; 更新节点包括的间接索引信息更新单元设置为: 当所述节点为没有目标 数据的节点时, 将查询发起节点和目标数据的关联插入该没有目标数据的节 点的间接索引信息中。 所述广播单元还设置为: 当所述节点为需要删除目标数据的节点时, 该 需要删除目标数据的节点删除目标数据后, 向其他节点广播删除消息; 所述直接索引信息更新单元还设置为: 当所述节点接收到删除消息的节 点时, 收到删除消息后更新或删除被删除目标数据的直接索引信息; 所述间接索引信息更新单元还设置为: 当所述节点接收到删除消息的节 点时, 收到删除消息后更新或删除被删除目标数据的间接索引信息。 所述节点还包括: 删除单元, 其设置为: 在索引单元存储空间已满的情况下, 对所述间接 索引信息的表项进行随机删除, 以插入新的表项;
以及在间接索引信息的内容没有达到门限的情况下, 对所述直接索引信 息的表项进行时间排序, 对最久未被使用的表项进行删除操作, 以插入新的 表项。
本发明提供了在无结构 P2P网络下釆用索引信息进行数据查询以及对索 引信息进行实时更新的方法, 提高了查询效率, 减少了网络负载。
附图概述 图 1是本实施方式无结构 P2P网络的数据查询方法的简要流程图; 图 2是本实施方式无结构 P2P网络的数据查询方法中无索引信息数据查 询过程示意图; 图 3是本实施方式无结构 P2P网络的数据查询方法中在有直接索引信息 场景下数据查询过程示意图; 图 4是本实施方式无结构 P2P网络的数据查询方法中在有间接索引信息 场景下数据查询过程示意图; 图 5是本实施方式无结构 P2P网络的数据查询方法中数据删除过程示意 图;
图 6是本实施方式无结构 P2P网络系统的结构示意图。
本发明的较佳实施方式
下面通过具体实施例结合附图对本发明实施例作进一步详细说明。 本发明涉及无结构 P2P网络, 包括构成自治域的多个节点, 自治域的每 个节点均设置索引单元, 并实时更新。 该索引单元包括需优先查询的直接索 ? )信息和在后查询的间接索引信息, 自治域中的查询发起节点通过本节点的 索引单元获取目标数据的直接索引信息并向目标节点发起数据请求。 本实施 例中的数据查询方法将节点自身资源引入到索引选择机制中, 该选择机制通 过索引信息, 釆用直接索引信息或者间接索引信息的选择实现的。 本实施例的自治域内各个节点的索引单元将过往发生的有关查询的动作 信息以直接索引信息或间接索引信息的方式记录下来, 为后续的数据查询尽 量提供本地索引信息, 尽量减少发送无指向性消息, 同时也灵活运用无指向 性消息和定向查询消息, 实现数据快速高效查询, 并且也大大节省了网络带 宽及性能开销, 从而解决网络拥塞问题。 无结构 P2P网络自治域的每个节点上设置索引单元, 并实时更新该索引 单元。 该索引单元在本发明实施例中为索引表, 当然也可以是釆取其他能实 现保存索引信息的其他形式。 上述索引表的表项的内容为数据请求基本单元 (以下简称数据块或者目标数据)与本自治域内可能与此数据块相关的其它 节点的映射索引信息。 表项的内容分为两种情况, 包括优先查询的直接索引信息和在后查询的 间接索引信息。 直接索引信息表项保存的是具有某数据块内容的目标节点信 息及最近使用该表项的时间戳。 通过直接索引信息, 存储有该直接索引信息 表项的节点可直接向目标节点发起数据请求。 间接索引信息表项保存一个或多个其它节点信息, 这些节点或者具有该 数据块的直接索引信息表项或者具有该数据块; 存储有间接索引信息表项的 节点, 可向间接索引信息表项中的节点发起定向查询请求, 以从其记录的节 点的索引单元中获取直接索引信息, 进而再执行直接索引操作, 以向目标节 点发起数据请求。
图 1所示为本实施例中数据查询及请求的简要流程图, 说明如下: 步骤 S101、 查询发起节点需要查询目标数据,首先查看在本地索引表中 有没有相关直接索引信息, 若有则根据直接索引信息, 直接向目标节点发起 数据请求 (即查询发起节点发起直接索引信息数据请求) , 如果直接索引信 息数据请求成功, 则流程结束; 步骤 S102、若查询发起节点本地没有相关直接索引信息或者直接索引信 息数据请求失败, 则查询发起节点删除相应直接索引信息后, 查看本地索引 表中是否有间接索引信息, 若有相关间接索引信息, 则向间接索引信息记录 的定向查询节点发起定向查询请求。 在特定时间内查询发起节点若收到有效 的可发起数据请求的节点信息, 表示间接索引数据查询成功, 则将相关节点 信息插入到索引表的直接索引信息中, 并删除相应的间接索引信息, 然后触 发直接索引数据请求过程, 即返回步骤 S101。 若在特定时间内查询发起节点 没有收到有效的可发起数据请求的节点信息, 表示间接索引数据查询失败, 则删除相应的间接索引信息, 触发广播查询过程, 即执行步骤 S103; 步骤 S103、若查询发起节点本地索引表没有记录任何相关索引信息或者 通过索引信息的数据请求过程失败, 节点向自治域内其他节点发送广播查询 消息。 接收到广播查询消息的节点检查自身是否存储有目标数据, 若有, 则 把自身节点信息和 /或本地保存的与目标数据有关的节点索引信息发送给广 播发起节点, 若没有, 则不响应并将广播发起节点插入到本地间接索引信息 中; 在特定时间后, 广播发起节点将接收到的有效的可发起数据请求的节点 信息插入到本地直接索引信息中, 继而触发直接索引数据请求过程, 即返回 步骤 S101 , 最终获得目标数据。
本实施方式中, 自治域的每个节点对自身索引单元的实时更新为涉及的 节点均参与的自学习性实时更新。 同一自治域内各个节点的索引单元将过往 发生的有关查询的动作信息以直接或间接索引信息的方式记录下来, 为后续 的数据查询尽量提供本地索引信息, 使得数据查询更具有自学习性。 以下详细说明本实施例的数据查询方法。 图 2所示为本发明查询发起节点在没有相关索引信息的情况下查找并请 求数据的过程示意图。 当无结构 P2P网络自治域内的查询发起节点需要查找 一个本地没有的目标数据时, 若查询发起节点本地没有关于目标数据的任何 直接索引信息或是间接索引信息, 则查询发起节点向本自治域内所有其它节 点发送广播查询消息, 然后等待其它节点向查询发起节点发送响应消息。 说 明如下:
21、 自治域中某节点需要目标数据时, 则其向本自治域中其它所有节点 发送广播查询消息, 并等待其它节点的响应;
22、 本自治域中接收到广播查询消息的节点查看本地是否有目标数据, 若有目标数据, 则将自身的存储、 网络带宽、 计算资源、 负载情况以及本地 存储的与目标数据相邻的 (即查询发起节点接下来可能会请求的)数据信息 一起作为响应消息发回给查询发起节点; 若接收到广播查询消息的节点本地 没有目标数据则不响应此广播查询消息, 但认为查询发起节点最终将以某种 形式成功地获得有关目标数据的索引信息, 收到广播查询信息的各节点将查 询发起节点的信息与被请求数据块相关联,并加入到本地的间接索引信息中;
23、 等待特定时间后, 查询发起节点在接收到来自其它节点返回的有效 的响应消息后, 将发送响应消息的节点信息与相关目标数据进行关联并记录 到本地的直接索引信息中, 然后筛选出一个或多个最合适的节点发起数据请 求;
24、 被请求节点随即将目标数据发送给查询发起节点。 以上过程实际是在一次查询中, 查询发起节点与被广播查询节点都在学 习的过程, 从而逐步积累并了解本自治域内的数据分布情况。
在查询发起节点的索引单元已经更新有了经过学习的直接和间接索引信 息时, 则通过索引单元进行数据查询及数据请求。 优先查询直接索引信息, 具体情况如下:
( 1 )若查询发起节点本地有直接索引信息, 先利用直接索引信息, 在直 接索引信息足够的情况下, 该查询发起节点则根据以往记录的对端带宽等资 源状况信息从直接索引信息记录中选取一个或多个目标节点, 向其发起数据 通信请求。 请参考图 3 图 3所示为本实施例中查询发起节点利用直接索引信息查找并请求数据 的过程示意图, 说明如下:
31、 自治域中查询发起节点需要目标数据时, 在本地相应的直接索引信 息表项中选出一个或多个目标节点发起数据请求; 32、 本自治域中接收到数据请求的目标节点若检查到在本地已经没有目 标数据, 则向查询发起节点发送数据请求失败消息, 并将查询发起节点与目 标数据的关联信息插入到本地间接索引信息中, 查询发起节点在收到数据请 求失败消息后将与此次失败查询所对应的直接索引信息从列表中删除;
33、 本自治域中接收到数据请求的目标节点在本地有目标数据的情况下 响应数据请求, 查询发起节点则对直接索引信息表中的时间戳更新为当前时 间。 若在特定时间内没有节点响应查询发起节点的数据请求, 则查询发起节 点在有间接索引信息的情况下将触发间接索引查询过程, 若没有相应的间接 索引信息, 则触发广播查询过程以查询目标数据, 在此过程中可以不再对之 前查询失败的节点发送广播消息, 也可以对除本节点之外的其他所有节点发 送广播消息。
( 2 )若直接索引信息中记录的目标节点不足够或已失效,或者本地只有 间接索引信息, 则利用间接索引信息展开间接索引过程。 请参考图 4。 图 4所示为本实施例中节点利用间接索引信息查找并请求数据的过程示 意图, 说明如下:
41、 自治域中查询发起节点需要目标数据时, 其在本地相应的间接索引 信息表项中选出一个或多个定向查询节点发起定向查询请求;
42、 本自治域中接收到定向查询请求的定向查询节点在本地直接索引信 息表中查询与被请求目标数据相关的节点信息, 若相关直接索引仍然有效, 则将相关节点信息发送给查询发起节点; 若该定向查询节点本地亦存储有目 标数据, 在此情况下, 若定向查询节点的直接索引表中有有效信息, 则将自 身信息与直接索引表中节点信息一起发送给查询发起节点, 若定向查询节点 没有相关的有效直接索引信息, 则只将自身信息发送给查询发起节点; 若定 向查询节点本身没有目标数据且直接索引表中表项已经失效, 则将查询发起 节点的信息插入到本地间接索引表中, 然后向查询发起节点发送数据查询失 败消息, 查询发起节点在接收到失败消息后则将相应的间接索引信息表项删 除;
43、 等待特定时间之后, 若查询发起节点接收到有效节点信息, 则将这 些节点信息插入到直接索引信息列表中, 并在间接索引信息表中删除相应的 表项, 然后根据返回的节点信息筛选出一个或多个最合适的节点发起数据请 求;
44、 自治域中接收到数据请求的目标节点若本地仍然存储有目标数据则 响应查询发起节点的数据请求, 开始数据传送;
45、 若自治域中接收到数据请求的目标节点本地已经没有目标数据, 则 向查询发起节点发送数据请求失败消息, 查询发起节点在接收到数据请求失 败消息后将本地相关直接索 I表项删除。 在特定时间内, 若查询发起节点没有收到有效的节点信息或者数据请求 全部失败, 则将触发广播查询过程以查询目标数据, 在此过程中可以不再对 之前查询失败的节点发送广播消息, 也可以对除本节点之外的其他所有节点 发送广播消息。
由于在现实网络系统中服务器的存储能力有限, 因此 P2P网络自治域中 的节点会有删除已有数据块的操作。 在这种情况下, 为了避免删除数据块造 成索引信息无效的情况, 各个节点在删除数据块的同时, 需要向同自治域内 的其它节点广播删除消息。 节点在接收到删除消息后, 则需要将本地索引单 元中相关的索引信息进行更新或删除。 由于在节点上发生数据块删除的操作 不会太频繁, 因此不会对网络造成负担。 图 5所示为本发明中节点删除本地数据的过程示意图, 说明如下:
51、 一个无结构 P2P网络自治域中的某个节点在本地存储空间达到特定 门限后, 该节点向本自治域中的其它所有节点发送广播删除消息, 通知其它 节点其删除的媒体内容的信息;
52、 接收到广播删除消息的节点将本地学习信息中与广播删除消息发出 节点及相关媒体内容的信息进行更新或是删除。 在查询发起节点与目标节点或者定向查询节点进行直接或间接索引信息 更新的过程中, 若索引表存储空间已满, 则首先检查间接索引表项中内容数 量是否超过特定门限, 若已经超过, 则在间接索引表项中随机删除相应数量 的表项, 以插入新的表项。 若间接索引表项中内容没有达到门限, 在直接索 引信息表项中, 每一条表项均有相应的时间戳, 在表项被插入到索引信息表 项中或者在查询过程中使用到该表项时, 表项相应的时间戳将被更新为当前 时间, 然后根据这个时间戳进行表项排序后, 对最久未被使用到的表项进行 删除操作, 以插入新的表项。 本实施方式中的数据查询方法适用于电信网络节点自治域, 由于电信网 络中节点具有计算及存储性能高、 节点数量规模小、 网络带宽资源丰富、 在 线时间长且稳定等特性, 因此在这种环境下, 本实施例能很好地避免在无结 构 P2P中大量洪泛式消息给系统带来的网络阻塞的隐患, 并且将节点自身资 源引入到选择机制中, 从而使系统自身具有一定负载均衡的能力。 请参考图 6, 图 6所示为本实施例的系统结构示意图。 本发明的无结构 P2P网络可进一步模块化为一种无结构 P2P网络系统。 该网络系统包括构成自治域的若干节点( 10-1 ~ 10-N )。每个节点( 10-1 ~ 10-N )通过网络接口 62彼此互联, 每一节点包括具有索引信息的索引单元 64、 数据请求单元 66、 自学性实时更新该索引单元 64的更新单元 67、 广播 单元 68以及删除单元 69。该更新单元 67用于将节点有关的查询动作记录在 索引单元 64的索引信息中。 该索引单元 64的索引信息包括在先查询的直接索引信息 641和在后查询 的间接索引信息 642。 该直接索引信息 641 包括目标节点信息, 该间接索引 信息 642用来从其记录的节点索引单元中获取直接索引信息。 该数据请求单 元 66的数据请求操作包括通过直接索引信息 641向目标节点发起直接索引和 /或通过间接索引信息 642向定向查询节点发起间接索引。 该更新单元 67包括:直接索引信息更新单元 671和间接索引信息更新单 元 672。
上述索引单元和更新单元可以合在一起, 也可以分别设置。 该数据请求单元 66设置为: 节点在作为查询发起节点时,通过索引信息 获取具有目标数据的目标节点信息, 并向目标节点发起数据请求。 其中, 该直接索引信息更新单元 671设置为: 在直接索引成功时, 将相 应直接索引信息 641的时间戳更新为当前时间, 直接索引失败时, 删除相应 直接索引信息 641 ; 在间接索引成功时, 将目标节点信息插入直接索引信息 641。 该间接索引信息更新单元 672设置为: 在直接索引失败时, 将查询发起 节点与目标数据关联并插入到目标节点的间接索引信息 642中; 在间接索引 成功时, 将目标节点信息插入直接索引信息 641并删除间接索引信息 642的 相关内容; 在间接索引失败时, 删除间接索引信息 642的相关内容, 并将查 询发起节点的信息插入定向查询节点的间接索引信息 642。 该广播单元 68设置为: 在该查询发起节点的索引单元 64没有目标数据 的直接索引信息和间接索引信息或者该查询发起节点间接索引失败时, 向其 它节点发送广播查询消息。 对应该广播查询过程, 该直接索引信息更新单元 671 还设置为: 将广播查询响应的节点信息记录到直接索引信息。 该间接索 引信息更新单元 672还设置为: 将查询发起节点和目标数据的关联插入没有 响应的节点的间接索引信息中。 该广播单元 68还设置为:该节点删除目标数据后向其他节点广播删除消 息。对应该广播单元 68的删除广播过程,该直接索引信息更新单元 671还设 置为: 收到删除消息后更新或删除被删除目标数据的直接索引信息。 该间接 索引信息更新单元 672还设置为: 收到删除消息后更新或删除被删除目标数 据的间接索引信息。 该删除单元 69在索引单元 64存储空间已满的情况下, 对该间接索引信 息 642的表项进行随机删除, 以插入新的表项; 在间接索引信息的内容没有 达到门限的情况下, 对该直接索引信息 641的表项进行时间排序, 对最久未 被使用的表项进行删除操作, 以插入新的表项。
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序 来指令相关硬件完成, 所述程序可以存储于计算机可读存储介质中, 如只读 存储器、 磁盘或光盘等。 可选地, 上述实施例的全部或部分步骤也可以使用 一个或多个集成电路来实现。 相应地, 上述实施例中的各模块 /单元可以釆用 硬件的形式实现, 也可以釆用软件功能模块的形式实现。 本发明不限制于任 何特定形式的硬件和软件的结合。
本发明与现有技术相比的有益效果包括:
1 )本发明的 P2P网络数据查询方法和系统, 在无结构 P2P网络自治域 的每个节点设置和实时更新索引单元, 自治域中的查询发起节点通过本节点 的索引单元获取目标数据的直接索引信息并向目标节点发起数据请求, 从而 将节点自身资源引入到选择机制中, 同域内各个节点的索引单元将过往发生 的有关查询的动作信息以直接或间接索引信息的方式记录下来, 为后续的数 据查询尽量提供本地索引信息, 尽量减少发送无指向性消息, 大大节省了网 络带宽及性能开销, 解决网络拥塞问题;
2 )本发明的 P2P 网络数据查询方法和系统, 在索引单元未更新有目标 数据的直接索引信息和 /或间接索引信息时,或者自治域内的节点删除数据块 时, 才发送广播查询消息以及广播删除消息等无指向性消息, 在间接索引时 发送定向查询信息, 数据查询方式灵活, 实现高效数据查询定位, 有效提高 了自治域内节点间的数据查询效率与命中率;
3 )本发明的 P2P 网络数据查询方法和系统, 通过域内每个节点实施更 新维护一份直接和间接索引信息, 将节点自身资源引入到选择机制中, 将索 引资源分布在多个节点, 使得系统自身具有一定的负载均衡能力;
4 )本发明的 P2P 网络数据查询方法和系统, 在电信网络中运用无结构 P2P方式, 由于在电信网络中, 主机节点具有计算及存储性能高、 节点数量 规模小、网络带宽资源丰富、在线时间长且稳定等特性,舍弃传统结构化 P2P 将减少大量不必要的维护性能开销;
5 )本发明的 P2P 网络数据查询方法和系统, 自治域的每个节点对自身 索引单元的实时更新为涉及的节点均参与的自学习性实时更新, 同域内各个 节点的索引单元将过往发生的有关查询的动作信息以直接或间接索引信息的 方式记录下来, 为后续的数据查询尽量提供本地索引信息, 使得数据查询更 具有自学习性。 以上内容是结合具体的实施方式对本发明所作的进一步详细说明, 不能 认定本发明的具体实施只局限于这些说明。 对于本发明所属技术领域的普通 技术人员来说, 在不脱离本发明构思的前提下, 还可以做出若干简单推演或 替换, 都应当视为属于本发明的保护范围。
工业实用性 本发明提供了在无结构 P2P网络下釆用索引信息进行数据查询以及对索 引信息进行实时更新的方法, 提高了查询效率, 减少了网络负载。

Claims

权 利 要 求 书
1、 一种无结构点对点 (P2P ) 网络的数据查询方法, 所述方法包括: 无结构 P2P网络的每个节点均设置索引单元, 并实时更新该索引单元, 所述索引单元包括索引信息; 以及 查询发起节点通过本节点的索引单元的索引信息获取具有目标数据的目 标节点信息, 并向目标节点发起数据请求。
2、根据权利要求 1所述的方法, 其中: 所述索引单元的索引信息包括在 先查询的直接索引信息和 /或在后查询的间接索引信息,所述直接索引信息包 括目标节点信息, 所述间接索引信息用来从其记录的节点索引单元中获取直 接索引信息。
3、根据权利要求 2所述的方法, 其中, 查询发起节点通过本节点的索引 单元的索引信息获取具有目标数据的目标节点信息的步骤包括: 查询发起节点先查询目标数据的直接索引信息, 并根据查询到的直接索 引信息向目标节点发起直接索引; 以及 直接索引成功时, 查询发起节点将发起直接索引时依据的直接索引信息 的时间戳更新为当前时间; 直接索引失败时, 查询发起节点删除发起直接索引时依据的直接索引信 息, 对应的目标节点将查询发起节点与目标数据关联并插入到该目标节点的 间接索引信息中。
4、根据权利要求 2所述的方法, 其中, 查询发起节点通过本节点的索引 单元的索引信息获取具有目标数据的目标节点信息的步骤包括: 查询发起节点在没有目标数据的直接索引信息或者直接索引失败时, 查 询目标数据的间接索引信息并向查询到的间接索引信息相关的定向查询节点 发起间接索引; 以及 在间接索引成功时, 查询发起节点将节点信息插入直接索引信息, 并删 除相应的间接索引信息; 在间接索引失败时, 查询发起节点删除间接索引信息的相关内容, 对应 的定向查询节点将查询发起节点的信息插入到该定向查询节点的间接索引信 息。
5、 根据权利要求 4所述的方法, 其中, 在间接索引成功时, 查询发起节 点插入直接索引信息的节点信息的步骤中, 所述节点信息包括三种情况: 当定向查询节点的相关直接索引信息有效时, 所述节点信息为定向查询 节点直接索引信息中与目标数据有关的节点信息;
当所述节点信息的相关直接索引信息有效并且定点查询节点存储有目标 数据时, 所述节点信息为定向查询节点直接索引信息中与目标数据有关的节 点信息以及定点查询节点的节点信息; 当所述节点信息没有相关直接索引信息但是定点查询节点存储有目标数 据时, 所述节点信息为定向查询节点的节点信息。
6、 根据权利要求 2-5中任意一项所述的方法, 其中, 向目标节点发起数 据请求的步骤之前, 所述方法还包括: 在所述查询发起节点的索引单元没有目标数据的直接索引信息和间接索 引信息时, 或者所述查询发起节点间接索引失败时, 查询发起节点向其它节 点发送广播查询消息; 具有目标数据的节点向查询发起节点发送响应消息; 以及 查询发起节点将发送响应消息的节点的节点信息记录到直接索引信息, 且没有发送响应消息的节点将查询发起节点和目标数据的关联插入到该发送 响应消息的节点的间接索引信息。
7、 根据权利要求 6所述的方法, 其还包括: 无结构 P2P网络的节点在 删除索引信息中的索引信息时, 向其它节点广播删除消息, 收到删除消息的 节点更新或删除索引信息。
8、根据权利要求 7所述的方法, 其中: 每个节点对自身索引单元的实时 更新为将其它节点的查询动作记录在直接索引信息和 /或间接索引信息上的 自学习性实时更新。
9、 一种无结构点对点(P2P ) 网络的自学性索引更新方法, 所述方法包 括: 无结构 P2P网络的每个节点均设置索引单元, 所述索引单元包括索引信 息; 以及 每个节点根据有关的查询动作更新索引信息中, 从而自学性实时更新所 述索引单元。
10、 根据权利要求 9所述的方法, 其中: 所述索引单元的索引信息包括 直接索引信息和间接索引信息, 所述直接索引信息包括目标节点信息, 所述 间接索引信息用来从其记录的节点索引单元中获取直接索引信息; 所述自学 性实时更新包括直接索引信息的更新和间接索引信息的更新。
11、根据权利要求 10所述的方法,其中,所述直接索引信息的更新包括: 当查询发起节点查询到目标数据的直接索引信息并向目标节点直接索引 成功时, 查询发起节点将相应直接索引信息的时间戳更新为当前时间; 直接索引失败时, 查询发起节点删除相应直接索引信息; 在查询发起节点没有查询到目标数据的直接索引信息或者直接索引失 败, 且查询到目标数据的间接索引信息, 并向查询到的间接索引信息相关的 定向查询节点发起间接索引成功时, 查询发起节点将节点信息插入直接索引 信息并删除间接索引信息的相关内容; 当查询发起节点发送广播查询消息, 且具有目标数据的节点向查询发起 节点发送响应消息时, 查询发起节点将发送响应消息的节点的节点信息记录 到直接索引信息; 以及 一节点在删除索引单元中的索引信息并广播删除消息时, 收到删除消息 的节点更新或删除直接索引信息。
12、 根据权利要求 10或 11所述的方法, 其中, 所述间接索引信息更新 包括: 当查询发起节点查询到目标数据的直接索引信息并向目标节点直接索引 失败时, 目标节点将查询发起节点与目标数据关联并插入到本目标节点的间 接索引信息中; 在查询发起节点没有查询到目标数据的直接索引信息或者直接索引失 败, 且查询到目标数据的间接索引信息, 并向与间接索引信息相关的定向查 询节点发起间接索引成功时, 查询发起节点删除间接索引信息的相关内容; 在间接索引失败时, 查询发起节点删除间接索引信息的相关内容; 在间接索引失败时, 定向查询节点将查询发起节点的信息插入该定向查 询节点的间接索引信息; 查询发起节点发送广播查询消息时, 没有目标数据的节点将查询发起节 点和目标数据的关联插入到该没有目标数据的间接索引信息; 一节点在删除索引单元中的索引信息并广播删除消息时, 收到删除消息 的节点更新或删除间接索引信息。
13、 一种无结构 P2P网络系统中的节点, 其包括: 具有索引信息的索引单元,
实时更新所述索引单元的更新单元, 更新单元设置为: 将节点有关的查 询动作记录在所述索引单元的索引信息中。
14、 根据权利要求 13所述的节点, 所述节点还包括: 数据请求单元, 其设置为: 当本节点作为查询发起节点时, 通过索引信 息获取具有目标数据的目标节点信息, 并向目标节点发起数据请求。
15、根据权利要求 14所述的节点, 其中, 所述索引单元的索引信息包括 在先查询的直接索引信息和在后查询的间接索引信息, 所述直接索引信息包 括目标节点信息, 所述间接索引信息用来从其记录的节点索引单元中获取直 接索引信息; 所述数据请求单元是设置为按如下方式向目标节点发起数据请求: 通过 直接索引信息向目标节点发起直接索引和 /或通过间接索引信息向定向查询 节点发起间接索引。
16、 根据权利要求 15所述的节点, 其中, 所述更新单元包括: 直接索引信息更新单元, 其设置为: 在直接索引成功时, 将相应直接索 引信息的时间戳更新为当前时间; 直接索引失败时,删除相应直接索引信息; 以及在间接索引成功时, 将目标节点的节点信息插入直接索引信息。
17、 根据权利要求 15所述的节点, 其中, 所述更新单元包括: 间接索引信息更新单元, 其设置为: 当所述节点为目标节点时, 在直接 索引失败时, 将查询发起节点与目标数据关联并插入到目标节点的间接索引 信息中; 当所述节点为查询发起节点时, 在间接索引成功时, 将目标节点的 节点信息插入直接索引信息并删除相应的间接索引信息; 当所述节点为查询 发起节点时, 在间接索引失败时, 删除间接索引信息的相关内容; 当所述节 点为定向查询节点时, 在间接索引失败时, 将查询发起节点的节点信息插入 定向查询节点的间接索引信息。
18、 根据权利要求 15-17中任一项所述的节点, 所述节点还包括: 广播单元, 其设置为: 当所述节点为查询发起节点, 且在所述查询发起 节点的索引单元没有目标数据的直接索引信息和间接索引信息或者所述查询 发起节点间接索引失败时, 向其它节点发送广播查询消息; 更新节点包括的直接索引信息更新单元设置为: 当所述节点为查询发起 节点, 将具有目标数据的广播查询响应的节点信息记录到直接索引信息; 更新节点包括的间接索引信息更新单元设置为: 当所述节点为没有目标 数据的节点时, 将查询发起节点和目标数据的关联插入该没有目标数据的节 点的间接索引信息中。
19、 根据权利要求 18所述的节点, 其中: 所述广播单元还设置为: 当所述节点为需要删除目标数据的节点时, 该 需要删除目标数据的节点删除目标数据后, 向其他节点广播删除消息; 所述直接索引信息更新单元还设置为: 当所述节点接收到删除消息的节 点时, 收到删除消息后更新或删除被删除目标数据的直接索引信息; 所述间接索引信息更新单元还设置为: 当所述节点接收到删除消息的节 点时, 收到删除消息后更新或删除被删除目标数据的间接索引信息。
20、 根据权利要求 19所述的节点, 所述节点还包括: 删除单元, 其设置为: 在索引单元存储空间已满的情况下, 对所述间接 索引信息的表项进行随机删除, 以插入新的表项; 以及在间接索引信息的内容没有达到门限的情况下, 对所述直接索引信 息的表项进行时间排序, 对最久未被使用的表项进行删除操作, 以插入新的 表项。
PCT/CN2010/077540 2009-12-10 2010-09-30 一种网络节点及其数据查询方法和索引更新方法 WO2011069387A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200910188807.1 2009-12-10
CN200910188807.1A CN101710902B (zh) 2009-12-10 2009-12-10 一种无结构p2p网络及其数据查询方法和索引更新方法

Publications (1)

Publication Number Publication Date
WO2011069387A1 true WO2011069387A1 (zh) 2011-06-16

Family

ID=42403662

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/077540 WO2011069387A1 (zh) 2009-12-10 2010-09-30 一种网络节点及其数据查询方法和索引更新方法

Country Status (2)

Country Link
CN (1) CN101710902B (zh)
WO (1) WO2011069387A1 (zh)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101710902B (zh) * 2009-12-10 2014-03-05 北京邮电大学 一种无结构p2p网络及其数据查询方法和索引更新方法
CN102271144A (zh) * 2010-06-01 2011-12-07 中兴通讯股份有限公司 P2p叠加网络及其数据资源操作方法和新节点加入方法
CN102202228B (zh) * 2011-05-24 2012-11-14 北京邮电大学 视频资源存储、查找的方法及装置
CN102281332B (zh) * 2011-08-31 2013-09-04 上海西本网络科技有限公司 分布式缓存阵列及其数据更新方法
CN103024009A (zh) * 2012-11-30 2013-04-03 广东欧珀移动通信有限公司 一种基于点对点网络传输的电子书数据更新方法
CN104301364B (zh) * 2013-07-17 2019-08-02 北京千橡网景科技发展有限公司 用于移动社交网络中实时推荐好友的方法和设备
CN104683415A (zh) * 2013-12-02 2015-06-03 乐视网信息技术(北京)股份有限公司 一种点对点网络中删除数据通知消息的发送方法及装置
CN103995265A (zh) * 2014-05-28 2014-08-20 广州南方卫星导航仪器有限公司 一种gnss测量装置中自动循环存储记录的方法及装置
CN105991691B (zh) * 2015-02-05 2019-04-02 中国电信股份有限公司 用于传输信息的方法、设备和系统
CN106126552B (zh) * 2016-06-16 2019-03-29 华中师范大学 一种基于iDistance的P2P空间数据查询方法及系统
CN110209884B (zh) * 2018-01-10 2022-08-05 杭州海康威视数字技术股份有限公司 一种索引校对方法和装置
CN110324371B (zh) * 2018-03-29 2021-03-12 北京忆芯科技有限公司 基于区块的分布式kv存储系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1126681A2 (en) * 2000-01-14 2001-08-22 Sun Microsystems, Inc. A network portal system and methods
CN1937584A (zh) * 2006-09-05 2007-03-28 华为技术有限公司 非结构化对等网络系统及其资源查找及路由更新方法
JP2007249724A (ja) * 2006-03-17 2007-09-27 Nippon Telegr & Teleph Corp <Ntt> XPath式処理装置、XPath式処理方法、および、XPath式処理プログラム
CN101364958A (zh) * 2008-09-05 2009-02-11 西安电子科技大学 基于非结构化p2p网络的搜索方法
CN101505272A (zh) * 2009-03-02 2009-08-12 浙江理工大学 一种基于p2p的查找有关节点子集合的方法
CN101710902A (zh) * 2009-12-10 2010-05-19 北京邮电大学 一种无结构p2p网络及其数据查询方法和索引更新方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7475153B2 (en) * 2004-07-16 2009-01-06 International Business Machines Corporation Method for enabling communication between nodes
CN101136916A (zh) * 2007-06-11 2008-03-05 夏莹杰 基于角色和信誉访问控制机制的p2p传输方法
CN101217565B (zh) * 2008-01-04 2011-12-14 华中科技大学 一种对等网络视频共享系统中分类检索的网络组织方法
CN101488137A (zh) * 2008-01-14 2009-07-22 深圳三石科技有限公司 基于热点缓存的搜索方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1126681A2 (en) * 2000-01-14 2001-08-22 Sun Microsystems, Inc. A network portal system and methods
JP2007249724A (ja) * 2006-03-17 2007-09-27 Nippon Telegr & Teleph Corp <Ntt> XPath式処理装置、XPath式処理方法、および、XPath式処理プログラム
CN1937584A (zh) * 2006-09-05 2007-03-28 华为技术有限公司 非结构化对等网络系统及其资源查找及路由更新方法
CN101364958A (zh) * 2008-09-05 2009-02-11 西安电子科技大学 基于非结构化p2p网络的搜索方法
CN101505272A (zh) * 2009-03-02 2009-08-12 浙江理工大学 一种基于p2p的查找有关节点子集合的方法
CN101710902A (zh) * 2009-12-10 2010-05-19 北京邮电大学 一种无结构p2p网络及其数据查询方法和索引更新方法

Also Published As

Publication number Publication date
CN101710902A (zh) 2010-05-19
CN101710902B (zh) 2014-03-05

Similar Documents

Publication Publication Date Title
WO2011069387A1 (zh) 一种网络节点及其数据查询方法和索引更新方法
JP5951071B2 (ja) プル・モード及びプッシュ・モードを組み合わせるシステム及び方法
WO2008034353A1 (fr) Procédé, système et dispositif permettant d&#39;établir une connexion entre homologues dans un réseau d&#39;homologues
JP3167893B2 (ja) ネットワーク資源ロケーショントラフィックを減少させる方法及び装置
CN101841553B (zh) 网络上请求资源的位置信息的方法、用户节点和服务器
US7577960B2 (en) System and method for managing cached objects using notifications bonds
US20150215400A1 (en) File Upload Method And System
US20090259667A1 (en) Method, device and system for distributing file data
WO2010127618A1 (zh) 一种实现流媒体内容服务的系统和方法
WO2011150830A1 (zh) 获取内容的方法、节点及内容网络
WO2010069198A1 (zh) 分布式网络构造方法和系统以及任务处理方法
WO2010028590A1 (zh) 地址列表的提供方法、对等网络及其调度方法
WO2008034352A1 (fr) Procédé, système et serveur frontière destinés à distribuer des ressources
WO2008025297A1 (fr) Procédé de téléchargement de fichiers selon la technique p2p (pair à pair) et système de téléchargement p2p
WO2008131653A1 (fr) Système et procédé pour la réalisation d&#39;une mémoire d&#39;abonnement à un réseau et serveur d&#39;abonnement
WO2019100831A1 (zh) 传输层协议适配的方法、网元设备及系统
US7877479B2 (en) Bandwidth control system and method capable of reducing traffic congestion on content servers
JP2007293843A (ja) 複数のコンテンツディレクトリサービス装置に対する同期化支援方法、前記同期化支援方法に用いられるコンテンツディレクトリサービス装置、およびそれを含むシステム
CN112860799A (zh) 一种分布式数据库数据同步的管理方法
US20110282883A1 (en) Indexing server and method therefor
WO2009006779A1 (fr) Procédé et système pour déterminer un nœud d&#39;index de domicile et un nœud de service de domicile d&#39;un utilisateur
JP2010271933A (ja) 分散保存システム、ノード装置、ノード処理プログラム及びデータファイル保存方法
KR101243071B1 (ko) 소스 스위칭 방법, 시스템, 및 디바이스
KR20130033252A (ko) 서비스 오버레이 네트워크에서 종단간 QoS 보장형 콘텐츠 전달 방법 및 그 시스템
WO2012048576A1 (zh) 控制p2p下载的方法、服务器及系统

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: 10835422

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: 10835422

Country of ref document: EP

Kind code of ref document: A1