[go: up one dir, main page]

WO2009143738A1 - Management method, content querying method, system and apparatus of distributed network - Google Patents

Management method, content querying method, system and apparatus of distributed network Download PDF

Info

Publication number
WO2009143738A1
WO2009143738A1 PCT/CN2009/071636 CN2009071636W WO2009143738A1 WO 2009143738 A1 WO2009143738 A1 WO 2009143738A1 CN 2009071636 W CN2009071636 W CN 2009071636W WO 2009143738 A1 WO2009143738 A1 WO 2009143738A1
Authority
WO
WIPO (PCT)
Prior art keywords
content
node
crp
update
irp
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
Application number
PCT/CN2009/071636
Other languages
French (fr)
Chinese (zh)
Inventor
李金龙
沈静波
刘姗姗
张进
王铁英
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of WO2009143738A1 publication Critical patent/WO2009143738A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5041Network service management, e.g. ensuring proper service fulfilment according to agreements characterised by the time relationship between creation and deployment of a service
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/40Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks using virtualisation of network functions or resources, e.g. SDN or NFV entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/508Network service management, e.g. ensuring proper service fulfilment according to agreements based on type of value added network service under agreement
    • H04L41/509Network service management, e.g. ensuring proper service fulfilment according to agreements based on type of value added network service under agreement wherein the managed service relates to media content delivery, e.g. audio, video or TV

Definitions

  • the embodiments of the present invention relate to the field of network technologies, and in particular, to a management method, a content query method, a system, and a device for a distributed network. Background technique
  • a P2P (Peer-to-peer) network is an emerging, distributed content sharing structure.
  • each node plays the role of a client and a server at the same time, providing content either as a content sharer or as a content consumer.
  • a node finds the node that stores the content by keyword or key value, and obtains the desired content from those nodes.
  • the concept of copying is introduced in the late P2P network, and the copy refers to the content that the node that does not own the content acquires and caches through the query.
  • the burden on the node is reduced, the efficiency of the query is improved, but a new problem is also introduced.
  • a P2P network there is no effective management between the copy of content and content.
  • the embodiment of the invention provides a distributed network management method, a content query method, a system and a device, so as to establish a novel network model of P2P content stable distribution, realize efficient searching of content, and track content changes, Content and its copies are controlled and managed.
  • An embodiment of the present invention provides a method for managing a distributed network, including: when a node joins a distributed network, by searching for content, generating a required content table of the content;
  • cluster management of the content is performed according to the demand content table.
  • the query request carrying a key value of the content; when the key value management range of the node does not include the key value of the content, obtaining a key value distance from the content according to the required content table
  • the smallest node forwards the query request to the node with the smallest key-value from the content.
  • An embodiment of the present invention provides a distributed network management system, including: a requirement content table generating node, configured to generate a content content table of the content by searching for content when the nodes respectively join the distributed network, and Routing and forwarding messages according to the demand content table;
  • cluster management node configured to perform cluster management of the content according to the demand content table.
  • An embodiment of the present invention provides a distributed network management system, including: a virtual server, configured to perform clustering management of the content according to a required content table; and a strong consistent node, configured to perform content update operations on the content, Sending an update request to the virtual server VS of the content; a weakly consistent node, configured to send a version verification request, when the version is the latest version of the content, perform a content update operation, and send an update request to the VS of the content; and the control node is configured to detect the content When the VS fails to leave, the content new VS is appointed, and when the content does not exist VS, the node that queried the content becomes the vs of the content.
  • An embodiment of the present invention provides a weakly consistent node, including:
  • a route forwarding module configured to perform route routing of the message according to the stored content table of requirements
  • An embodiment of the present invention provides a strong consistent node, including:
  • a route forwarding module configured to perform route routing of the message according to the stored content table of requirements
  • a second update operation module configured to perform a content update operation on the content, and send an update request to the VS of the content.
  • An embodiment of the present invention provides a virtual server, which includes:
  • a route forwarding module configured to perform route routing of the message according to the stored content table of requirements
  • An embodiment of the present invention provides a control node, which includes:
  • a route forwarding module configured to perform routing and forwarding of messages according to the stored content table of requirements
  • a third detecting module configured to detect whether the VS of the content is alive every other timer period
  • An appointment management module configured to appoint the content new VS when the third detection module detects that the VS of the content is detached, and when the content does not exist VS, appoint a node that queries the content to become The content of the vs.
  • the embodiment of the present invention can form a network with a regular topology structure by constructing a content and its copy and routing information, so that the content is stably distributed in the network; Ensure the efficiency of content search; effectively update and control the content and its copy, ensure the validity of the content and its copy; and reduce the entire network when the node moves and replaces and the node's content needs change Impact.
  • FIG. 1 is a schematic diagram of a two-layer structure in an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of adjacency connection between nodes in an embodiment of the present invention.
  • 3 is a data structure of a node in an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of a method for managing a distributed network according to Embodiment 1 of the present invention
  • FIG. 5 is a schematic diagram of CAN routing in Embodiment 2 of the present invention
  • FIG. 6 is a schematic diagram of an improved route in Embodiment 2 of the present invention.
  • FIG. 7 is a schematic flowchart of processing after a single node receives a query request according to Embodiment 2 of the present invention.
  • FIG. 8 is a schematic flow chart of a node performing content search and acquisition according to a second embodiment of the present invention.
  • FIG. 9 is a schematic flowchart of a node performing content update and release according to a third embodiment of the present invention.
  • FIG. 10 is a timing diagram of a normal departure of a CP in Embodiment 4 of the present invention
  • FIG. 11 is a timing diagram of a CP in a normal departure according to Embodiment 4 of the present invention
  • FIG. 13 is a timing diagram of the VS in the fourth embodiment of the present invention when leaving the abnormal departure
  • FIG. 14 is a timing diagram of converting an IRP into an IRP according to Embodiment 5 of the present invention
  • FIG. 15 is a timing diagram of converting a CRP into an IRP according to Embodiment 5 of the present invention
  • FIG. 16 is a weak consensus node according to an embodiment of the present invention; schematic diagram;
  • 17 is a schematic diagram of a strong consistent node in an embodiment of the present invention.
  • FIG. 18 is a schematic diagram of a virtual server according to an embodiment of the present invention.
  • FIG. 19 is a schematic diagram of a control node according to an embodiment of the present invention. detailed description
  • Embodiments of the present invention provide a method and an apparatus for managing a distributed network.
  • the embodiment of the present invention logically divides the system into a layer structure, with the upper layer being the content distribution and the lower layer being the node distribution.
  • Nodes use CAN (Controller Area Network) to establish d-dimensional key values. (All information in the registry is saved in various forms of key-value item data. Key-value items are represented by key-value names and data types. And the key value is composed of three parts, the format is: "key name: data type: key value") The basic route distribution of the space, and the content is mapped to the key value according to the DHT (Distributed Hash Table) mechanism. On a close node, one content and multiple nodes form a one-to-many relationship.
  • DHT Distributed Hash Table
  • each content is mapped by DHT to a node with the closest key value.
  • This node is called the CAN CP (Control Peer) of the content
  • the node PI is the CP of content A, each content.
  • the CP itself is not responsible for the management and update of the content, but serves as a backup node to store the information of the content and serves as the index node for the query.
  • Each content may be needed by other nodes that access the content, store the content, called a copy of the content, and possibly manipulate or update the content.
  • These nodes are called RPs for the content (Replica Peer, Copy node), as shown in Figure 1, the node connected to the dotted line is the RP, and nodes P2, P3, P4, and P6 are all inside.
  • Rong A's RP The role of RP is to: Maintain and update content and replicas by establishing a hierarchy.
  • VS Virtual Server
  • CRP Control Replica Peer
  • IRP Infirm Replica Peer
  • VS is a normal node selected from the RP and is responsible for updating and publishing the content.
  • the VS and CP maintain a two-way connection and periodically detect survival.
  • CRP is a node that is consistent with VS.
  • the copy of the content stored on the CRP remains the latest version.
  • CRP will receive the update information released by the VS.
  • the CRP maintains a bidirectional connection with the VS and maintains a timer. If there is no interaction information within a certain period, it will actively send information to detect the survival.
  • the IRP is a weakly consistent node with the VS.
  • the copy stored on the IRP may be an old version. After the content is updated, the update information released by the VS will not be received. Before the IRP uses the content, you need to verify the version information with VS to maintain the consistency of the content.
  • Adjacency connection refers to the connection between adjacent nodes generated according to the routing distribution of CAN, such as the connection between nodes P2 and P3 in Figure 2.
  • Remote connection refers to the connection between the nodes of the required content generated by the node's demand for content and the responsible content node, such as the connection between nodes P1 and P4 in Figure 1.
  • the connection between the CP and the RP, the connection between the VS and the CRP and the IRP are remote connections.
  • the remote connection may be bidirectional, such as a connection between the CP and the VS, or it may be unidirectional, such as a connection between VS and IRP.
  • Remote connection is equivalent to the "shortcut" in the small world theory, which can reduce the length of the query path.
  • a common node may have the same content of CP, VS, CRP, and IRP of different contents; for the same content, the node may be one of the contents of the content such as CP, VS, CRP, or IRP, and the structure is as shown in FIG. 3 .
  • the structure routing table is generated by the CAN protocol, and records the key value and address information of all nodes adjacent to the node. Nodes added to a structured network have a routing table.
  • the structure content table records information about all the contents of the node as the CP, including: the key value of the content, the specific information of the content, the key value and address information of the VS related to the content.
  • the demand content table records the key values of all the content required by the node, the specific information of the content, and the key value and address information of the CP where the content is located. If the node is VS, the key value and address information of all CRPs are also saved; if the node is a CRP or IRP of the desired content, the related VS key value and address information are also saved.
  • the rule effective topology of the routing information is realized by the adjacency connection and the remote connection between the nodes; the rule topology of the content and the copy thereof is realized by dividing the nodes into different types according to the requirements of the content. .
  • a first embodiment of the present invention provides a method for managing a distributed network. As shown in FIG. 4, the method includes:
  • Step s401 When the node joins the distributed network, the content table of the content of the content is generated by searching for content.
  • Step s402 Perform routing and forwarding of the message according to the required content table. Specifically, the routing and forwarding of the message are performed according to the structure routing table and the structure content table generated before the step s401, and the required content table generated in step s401.
  • This step specifically includes:
  • Step S402.1 The node receives a query request for content, and the query request carries a key value of the content.
  • Step S402.2 when the key value management range of the node does not include the key value of the content, the node acquires a key with the content according to the locally stored structure routing table, the structure content table, and the requirement content table. a node having the smallest value distance, and forwarding the query request to a node having the smallest distance from the content of the content;
  • Step S402.3 when the key value management range of the node includes the key value of the content, the node is the CP of the query content, when the content does not exist VS, the The node becomes a VS of the content, and establishes a bidirectional connection with the CP of the content; when the content exists in the VS, the node becomes an IRP of the content, and establishes a connection with the VS of the content.
  • Step s403 When the node is the virtual server VS of the content, performing cluster management of the content according to the required content table.
  • the cluster management includes: content search and retrieval, content update and release, node join and leave, CRP and IRP management.
  • the content routing table, the structure content table, and the requirement content table are used to quickly locate and search the content, and the VS of the content is used for cluster management, thereby ensuring that the information stored on the CRP of the content remains consistent. .
  • Embodiment 2 Searching and obtaining content
  • the node Since the node not only stores the information of the neighbor nodes, but also stores the information of some distant nodes because of the remote connection, these remote connections are equivalent to the "shortcut" in small-world, by routing these "shortcuts" and CAN routing algorithms. Combined, a smaller average query path length can be obtained.
  • node P5 needs to find content A. If it is a routing algorithm through CAN, find the content A along the path of P5_>P4_>P3_>P1_>A, as shown in Figure 5. However, if there is a cluster connection between P4 and P1, the search can find content A along the path of P5_>P4_>P1_>A, as shown in Figure 6.
  • Node P receives a request for the node whose address is Address is the key content. If (Key belongs to the range of key values of node P) ⁇ itself is the target node
  • ⁇ P is the CRP or IRP of the content
  • PeerNearest i: the VS of the content
  • the distanced node P is the key value of the i-th dimension - the key value of the key in the i-th dimension; the routing of the message by the node according to the structure routing table, the structure content table, and the requirement content table includes:
  • Step s701 the node P receives the query request.
  • the request contains the address information (Address ) of the original node and the key value ( Key ) of the search content.
  • Step s702 Determine whether the key value of the search content is in the key value management range of the node P, if the node P is the target node of the query request, that is, the CP of the search content, go to step s703, otherwise, the relay of the query request Node, go to step s704.
  • Step s703 returning metadata of the search content to the original node and the content of the search content
  • Step s704 Obtain a node with the smallest distance from the search content key value from the CAN routing table.
  • Step s706 Obtain a node with the smallest distance from the search content key value from the requirement content table.
  • Step s707 Obtain a node having the smallest distance from the search content key value from steps s704 to s706, and continue forwarding the query request to the node having the smallest distance from the search content key.
  • the CP After the node finds the desired content, the CP directly returns the specific information of the content and the VS address of the content. If the node only needs the current value of the content, and does not need to pay attention to the change or operation of the content information, only the returned content is stored and used. As shown in Figure 8, if the node needs to continuously focus on the content or operate on the content, the node establishes a connection with the VS and becomes the IRP node of the content. If the content does not have an RP, and there is no VS, the node obtains specific information of the content from the CP, automatically becomes the VS of the content, and establishes a bidirectional connection with the CP, and the VS of the content performs clustering of the content according to the demand content table. management. In this embodiment, the method of clustering connections and routing by content key values ensures the efficiency of content search.
  • Figure 8 includes the following steps:
  • Step s801 Search the structure routing table, the content routing table, and the requirement content table according to the key value of the content, and find the node with the closest key value to send the query request.
  • Step s802 After a number of times of forwarding, the CP that finds the content obtains the content and the address information of the VS of the content.
  • Step s804 storing and using the content.
  • Step S805 the content has been further determined whether VS, then go to step S806 is, otherwise, go to step S 807.
  • Step s806 becoming an IRP of the content, establishing a connection with the VS.
  • Step s807 becomes the VS of the content, and establishes a bidirectional connection with the CP.
  • the node is quickly located and the content is searched, and the content is divided.
  • the node that obtains the content may become a VS or an IRP of the content to continue to pay attention or operate on the content.
  • the present invention uses a mixed push/pull content update and distribution protocol for content and its copy. Control and update.
  • the embodiment of the present invention determines the type of the node according to the frequency of the node's demand for the content, sets the node that frequently accesses the content to CRP, and sets the node that accesses the content to the IRP. Moreover, in order to be able to distinguish different versions of the content after the content is updated, each content has a version number, and the VS of the content operates on the version number after each legal update.
  • Step s901 update the request.
  • an RP When an RP wants to operate on content, it first determines its type. If it is CRP, the node itself stores the latest version of the content, can directly operate on the content, and sends an update request to the VS, the request includes: the operation result and the current version number. If it is an IRP, the copy stored on the node may be an old version. The current version number needs to be sent to the VS to detect the version information. If the version number is the same as the current version stored on the VS, the VS returns a confirmation message. Then VS returns the content information of the current latest version. The IRP then operates on the content and issues an update request in the same way as CRP.
  • CRP CRP
  • IRP the copy stored on the node may be an old version.
  • the current version number needs to be sent to the VS to detect the version information. If the version number is the same as the current version stored on the VS, the VS returns a confirmation message. Then VS returns the content information of the current latest version.
  • the VS After receiving the updated content, the VS first determines whether the version number of the content is the latest version number, and if so, accepts the update and modifies the version number, and returns a confirmation message; otherwise, the update is rejected, and the latest version information is returned. If two RPs submit the update results at the same time, the VS determines the validity of the update based on the timestamp of the update request. E.g: Accept older updates with timestamps.
  • Step s903 update the release.
  • the updated content and the new version number are sent to the CP and all CRPs. Since there is a weak agreement between IRP and VS, there is no need to release updates to the IRP.
  • the VS is released with the update information of the content, so that the copy information of the content stored in the CRP of the content in the network is consistent.
  • Embodiment 4 Joining and leaving a node
  • a node leaving the network may cause a change in CP, a change in VS, and a change in the number of CRPs. Therefore, depending on the identity of the node, the node will leave the network normally and will leave the network in a different way.
  • the mapping between the CP and the content is mapped by the DHT mechanism, the key values of the CP and the content do not change, so the replacement of the CP occurs only when the CP leaves the system or the content disappears.
  • the key space occupied by the CP is responsible for the adjacent node of the CP according to the CAN protocol.
  • the CP can transfer content related information (including: specific information of the content, VS information) while transferring the key space, and notify the VS CP of the replacement.
  • the VS After learning the CP replacement, the VS sends the new CP information to all CRP nodes.
  • the IRP does not receive information on CP replacement, it can be found by asking VS or via CAN routing when needed. New CP.
  • the neighboring node automatically divides the key space occupied by the node after learning that the node is invalid, but does not know the content information on the key space. Since the VS periodically detects whether the CP is alive, the VS will find a failure when the CP fails. After the VS finds that the CP has failed, it copies the content information and its own information to the new CP and notifies all CRP CPs of the replacement.
  • a better performing node will be selected from the remaining CRPs as the new VS, and all CRP information of the content will be transmitted to the new VS, and Send your own departure and new VS information to all CRPs and CPs. All CRP and CP update the stored VS information. If the VS is the last CRP of the content, the information about the leaving of the CP is sent only to the CP, and the CP deletes the VS related information until the new node becomes the RP or the original IRP is used to query the VS information and is automatically upgraded to VS. And get the latest version information of the content from the CP.
  • a node with better performance refers to a node with a long online time and a large bandwidth.
  • VS can also be selected through other standards, such as: network delay or geographical location.
  • Failover replacement In the following 4 cases, the node will find VS failure: 1. CRP timer expires and probes VS; 2. CRP needs to submit updates; 3. IRP needs to verify content version status when using content; 4. New When the IRP joins, the CP returns the address information of the original VS, when the new IRP attempts to connect to the original VS. When the node finds that the VS has failed, it will actively notify the CP. After receiving the failure report, the CP will actively detect the VS and confirm the failure:
  • the node to be reported will be set as the new VS, and the content information stored by itself will be the latest version of the content, as shown in Figure 13-A;
  • the CP waits for a CRP timer cycle to wait for the CRP to report, and thereafter processes the same as above, as shown in Figure 13-B;
  • the CP waits for a timer period of the CRP, but If there is no CRP to report, it means that there is no CRP, then the IRP that is reported to be directly set to the new VS, and the content stored by itself is sent to the new VS as the latest version, and the information of the new VS is sent to All IRPs that report failures are shown in Figure 13-C.
  • the CRP When the CRP leaves the network normally, it will actively notify the VS. If the CRP fails, the VS will also find that the CRP has failed after one clock cycle. At the same time, the VS of the content deletes the key value and address information of the CRP that normally leaves or lapses in the content requirement table of the node when the CRP of the content leaves or leaves the content normally.
  • a node When a node leaves the network, it first causes the key space of the node to be repartitioned, which only affects the neighbor nodes of the node. Thereafter, depending on the type of the node, different effects will occur. If the node is a CP, it only affects the VS of the content; if the node is a VS, it affects the CP of the content and all CRPs; if the node is a CRP, it only affects the VS of the content; If the node is an IRP, it will not affect other nodes.
  • the CP, VS, and CRP of the content are normally or inactively separated by a periodic detection of the timer or by interaction (for example, content search and verification) to form a stable distribution.
  • a node that holds the content in the network is replaced and migrated, it is guaranteed that the search and management of the content is not affected.
  • the node replacement process will only affect neighbor nodes of the node, as well as specific nodes related to specific content, and most nodes and content of the entire network will not be affected. And because the content is stored on the VS and all CRPs and backed up on the CP, the content is not lost even if the node suddenly fails.
  • each CRP/IRP records its frequency of access to content in the most recent period of time and piggybacks when sending messages to VS.
  • the VS receives a request for each update information, it also calculates the frequency of the content update for a recent period of time, and sets the threshold for upgrading to CRP and downgrading to IRP according to the frequency of the content update.
  • the threshold for upgrade and downgrade is determined by the frequency of content update. It can be set to exactly equal to the frequency of content update. You can also set the upgrade threshold to the frequency of content update* ( 1+p ) and the downgrade threshold to content update. Frequency * ( lp ), where 0.5 ⁇ ⁇ ⁇ 1.
  • the IRP modifies its own state and initializes a timer to start timing. As shown in Figure 14.
  • the CRP is downgraded to an IRP.
  • VS deletes the information about the node and notifies the node to change the status.
  • the node changes its state and deletes the timer, as shown in Figure 15.
  • the VS-level management of the IRP and the CRP of the content satisfies the promotion requirements of the node, reduces the traffic caused by frequent detection of the CRP with low access frequency, and release of update information, and also enhances the traffic.
  • the user experience the VS-level management of the IRP and the CRP of the content satisfies the promotion requirements of the node, reduces the traffic caused by frequent detection of the CRP with low access frequency, and release of update information, and also enhances the traffic. The user experience.
  • the number of remote connections per node is not fixed, but is constantly changing according to the popularity of the content. The more popular the content, the more nodes there are, and the more remote connections are built, which can further speed up the search rate of popular content.
  • the embodiment of the invention further provides a distributed network management system, comprising: a virtual server, configured to perform clustering management of the content according to a requirement content table; And performing a content update operation on the content, and sending an update request to the VS of the content; the weakly consistent node is configured to send a version verification request, and when the version is the latest version of the content, performing a content update operation, Sending an update request to the VS of the content; a control node, configured to appoint the new VS of the content when the VS of the content is detected to be detached, and appointing the content when the content does not exist The node becomes the vs of the content.
  • the embodiment of the present invention provides a weakly consistent node.
  • the method includes: a query module 1 for searching content; a storage module 2, configured to store a structure routing table, a structure content table, and a search according to the query module 1.
  • the content generation requirement content table; the routing forwarding module 3 is configured to perform routing and forwarding of the message according to the structure routing table, the structure content table, and the requirement content table stored by the storage module 2.
  • the first update operation module 5 is configured to send a version verification request to the storage module 2, and when the version is the latest version of the content, perform a content update operation, and send an update request to the VS of the content.
  • the embodiment of the present invention provides a strong consistent node.
  • the method includes: a query module 1 for searching for content; a storage module 2, configured for storing a structure routing table, a structure content table, and searching according to the query module 1
  • the content generation requirement content table; the routing forwarding module 3 is configured to perform routing and forwarding of the message according to the structure routing table, the structure content table, and the requirement content table stored by the storage module 2.
  • the second update operation module 15 is configured to perform a content update operation on the content, and send an update request to the VS of the content.
  • the first detecting module 20 is configured to detect whether the VS of the content is alive every other timer period.
  • the first reporting module 25 is configured to report to the CP of the content that the VS of the content fails to leave when the first detecting module 20 detects that the VS of the content fails to leave.
  • the embodiment of the present invention provides a virtual server, as shown in FIG. 18, including: a query module 1 for searching content; a storage module 2, configured to store a structure routing table, a structure content table, and content searched according to the query module 1
  • the generated request content table; the route forwarding module 3 is configured to perform routing and forwarding of the message according to the structure routing table, the structure content table, and the requirement content table stored by the storage module 2.
  • Version verification module 25 Determining whether the IRP version of the content is the latest version of the content when receiving the version verification request of the IRP of the content; the update review module 26, after receiving the update request of the content, Determining whether the version number of the content is the latest version number, if yes, accepting an update operation on the content and modifying a version number of the content; receiving multiple updates to the content update operation on the content
  • the update audit is performed according to the timestamp of the update request;
  • the second detecting module 27 is configured to detect whether the CP of the content and the CRP of the content are alive every other timer period; the cluster management module 28, For receiving the update request for the content in the update auditing module 26, the second detecting module 27 detects that the CP of the content or the CRP of the content fails to leave, according to the required content table stored by the storage module 2 a cluster management of the content; a level management module 29, configured to upgrade an IRP of the content when an access frequency of the content of the IRP is higher than a set upgrade threshold a
  • the embodiment of the present invention provides a control node.
  • the method includes: a query module 1 for searching content; a storage module 2, configured to store a structure routing table, a structure content table, and content searched according to the query module 1.
  • the generated request content table; the route forwarding module 3 is configured to perform routing and forwarding of the message according to the structure routing table, the structure content table, and the requirement content table stored by the storage module 2.
  • a third detecting module 35 configured to detect whether the VS of the content is alive every other timer period; and an appointment management module 36, configured to: when the third detecting module 35 detects that the VS of the content fails to leave, The content new VS, when the content does not exist VS, the node that queried the content becomes the VS of the content.
  • a node may have the same identity of CP, VS, CRP, and IRP for different contents, and the processing mechanisms of CP, VS, CRP, and IRP of different contents are similar, the figure will be CP, VS, CRP and the same content.
  • the IRP is displayed centrally on one node. Does not affect a distributed network, a node can only be one of the CP, VS, CRP, or IRP of the same content.
  • Embodiments of the present invention provide a distributed network management system, including: a table generation node, configured to: when the nodes respectively join the distributed network, generate a content list of the content by searching for content, and perform routing and forwarding of the message according to the required content table; Clustering management of the content is performed according to the demand content table.
  • a table generation node configured to: when the nodes respectively join the distributed network, generate a content list of the content by searching for content, and perform routing and forwarding of the message according to the required content table
  • Clustering management of the content is performed according to the demand content table.
  • the nodes are classified according to the frequency of access of the nodes to the content, and a hierarchical structure is established between different types of nodes to implement content control.
  • the content update and release mode of the node is determined according to the access frequency of the node (also referred to as the demand frequency):
  • the embodiment of the present invention implements management and control of content and its copy under lower traffic, ensuring that all nodes obtain the freshest version when accessing the content, and ensure that all update operations are performed. It is cumulatively added on the basis of the latest version, and there is no update operation for the old version. In addition, it effectively reduces system traffic and can adapt to the needs of dynamically changing environments.
  • the node replacement process only affects the neighbor nodes of the node, as well as the specific nodes associated with a particular content, and most nodes and content of the entire network are not affected. And since the content is stored on the VS and all CRPs and backed up on the CP, the content is not lost even if the node suddenly fails.
  • modules in the device in the embodiment can follow The description of the embodiments is distributed in the apparatus of the embodiment, and the corresponding changes may also be made in one or more apparatuses different from the embodiment.
  • the modules of the above embodiments may be combined into one module, or may be further split into multiple sub-modules.
  • a computer device (may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A management method, content querying method, system and apparatus of distributed network are disclosed by the embodiment of the present invention. The method includes that: when a node joins a distributed network, by querying content, a demand content list of said content is generated; when a node is the virtual server VS of said content, clustered management of said content is performed according to the demand content list. The solution provided by the embodiment of the present invention can ensure the steady distribution of content in network, and the effectivity and efficiency of querying content.

Description

一种分布式网络的管理方法、 内容查询方法、 系统及装置 技术领域  Distributed network management method, content query method, system and device

本发明实施例涉及网络技术领域,特别是涉及一种分布式网络的 管理方法、 内容查询方法、 系统及装置。 背景技术  The embodiments of the present invention relate to the field of network technologies, and in particular, to a management method, a content query method, a system, and a device for a distributed network. Background technique

P2P ( Peer-to-peer, 点对点) 网络是一种新兴的、 分布式内容共 享结构。在 P2P网络中,每节点都同时扮演着客户端和服务器的角色, 既可以作为内容的共享者提供内容,也可以作为内容的需求者下载内 容。 当节点需要使用内容时, 通过关键字或键值查找到存储该内容的 节点, 并从这些节点获得所需内容。  A P2P (Peer-to-peer) network is an emerging, distributed content sharing structure. In a P2P network, each node plays the role of a client and a server at the same time, providing content either as a content sharer or as a content consumer. When a node needs to use content, it finds the node that stores the content by keyword or key value, and obtains the desired content from those nodes.

在实现本发明的过程中, 发明人发现现有技术至少存在以下问 题:  In carrying out the process of the present invention, the inventors have found that the prior art has at least the following problems:

早期的 P2P网络中, 内容仅存储在拥有该内容的节点上, 需要内 容的节点通过连接拥有该内容的节点才能获得内容。但当有大量节点 需要同一内容时, 拥有该内容的节点无法满足所有节点的查询需求; 另一方面, 当拥有该内容的节点失效或退出后, 网络中其他节点将无 法再获得该内容。  In the early P2P networks, content was only stored on the node that owns the content, and the node that needs the content can obtain the content by connecting the node that owns the content. However, when a large number of nodes need the same content, the node that owns the content cannot satisfy the query requirements of all nodes; on the other hand, when the node that owns the content fails or exits, other nodes in the network cannot obtain the content again.

为了解决上述问题,后期 P2P网络中开始引入副本的概念, 副本 是指本身并不拥有该内容的节点通过查询获取并緩存的内容。在网络 中引入副本之后 ,虽然节点的负担降低了 ,查询的效率也得到了提高 , 但也引入了新的问题。在 P2P网络中, 内容和内容的副本之间缺乏有 效的管理, 当拥有内容的节点上存储的内容被修改后, 如何同步修改 所有的副本, 并保证所有节点查询的都是最新版本的内容。 而且, 由 于 P2P网络中的节点具有短暂性, 网络中节点频繁更替, 节点对内容 的需求也频繁变化, 所以难以形成稳定分布。 而节点对内容查找的效 率以及对内容变化的跟踪也会随着节点的迁移和更替而受到影响。  In order to solve the above problem, the concept of copying is introduced in the late P2P network, and the copy refers to the content that the node that does not own the content acquires and caches through the query. After the introduction of the replica in the network, although the burden on the node is reduced, the efficiency of the query is improved, but a new problem is also introduced. In a P2P network, there is no effective management between the copy of content and content. When the content stored on the node that owns the content is modified, how to simultaneously modify all the copies, and ensure that all nodes query the latest version of the content. Moreover, due to the transient nature of the nodes in the P2P network, the frequent replacement of nodes in the network, and the frequent changes in the content of the nodes, it is difficult to form a stable distribution. The efficiency of the node's search for content and the tracking of content changes are also affected by the migration and replacement of nodes.

目前还缺乏让内容在网络中稳定分布,且需求某一内容的节点在 网络中快速的定位和获取有效内容的机制。 发明内容 There is currently a lack of nodes that allow content to be stably distributed across the network and require a certain content. A mechanism for quickly locating and obtaining valid content in the network. Summary of the invention

本发明实施例提供了一种分布式网络的管理方法、 内容查询方 法、 系统及装置, 以建立一种新型的 P2P内容稳定分布的网络模型, 实现内容的高效查找, 并跟踪内容的变化, 对内容及其副本进行控制 和管理。  The embodiment of the invention provides a distributed network management method, a content query method, a system and a device, so as to establish a novel network model of P2P content stable distribution, realize efficient searching of content, and track content changes, Content and its copies are controlled and managed.

本发明实施例一方面提出一种分布式网络的管理方法, 包括: 当节点加入分布式网络时, 通过查找内容, 生成所述内容的需求 内容表;  An embodiment of the present invention provides a method for managing a distributed network, including: when a node joins a distributed network, by searching for content, generating a required content table of the content;

当节点为所述内容的虚拟服务器 VS时, 根据所述需求内容表进 行所述内容的聚类管理。  When the node is the virtual server VS of the content, cluster management of the content is performed according to the demand content table.

本发明实施例一方面提出一种分布式网络的内容查询方法, 包 括:  An embodiment of the present invention provides a content query method for a distributed network, which includes:

接收内容的查询请求, 所述查询请求携带所述内容的键值; 当所述节点的键值管理范围不包括所述内容的键值时,根据需求 内容表获取与所述内容的键值距离最小的节点,向与所述内容的键值 距离最小的节点转发所述查询请求。  Receiving a query request of the content, the query request carrying a key value of the content; when the key value management range of the node does not include the key value of the content, obtaining a key value distance from the content according to the required content table The smallest node forwards the query request to the node with the smallest key-value from the content.

本发明实施例一方面提出一种分布式网络管理系统, 包括: 需求内容表生成节点, 用于当所述节点分别加入分布式网络时, 通过查找内容, 生成所述内容的需求内容表, 并根据所述需求内容表 进行消息的路由转发;  An embodiment of the present invention provides a distributed network management system, including: a requirement content table generating node, configured to generate a content content table of the content by searching for content when the nodes respectively join the distributed network, and Routing and forwarding messages according to the demand content table;

聚类管理节点,用于根据所述需求内容表进行所述内容的聚类管 理。  And a cluster management node, configured to perform cluster management of the content according to the demand content table.

本发明实施例一方面提出一种分布式网络管理系统, 包括: 虚拟服务器, 用于根据需求内容表进行所述内容的聚类管理; 强一致节点, 用于对所述内容进行内容更新操作, 向所述内容的 所述虚拟服务器 VS发送更新请求; 弱一致节点, 用于发送版本验证请求, 在所述版本为所述内容的 最新版本时, 进行内容更新操作, 向所述内容的 VS发送更新请求; 控制节点, 用于在探测到所述内容的 VS失效离开时, 任命所述 内容新的 VS, 当所述内容不存在 VS时, 任命查询所述内容的节点 成为所述内容的 vs。 An embodiment of the present invention provides a distributed network management system, including: a virtual server, configured to perform clustering management of the content according to a required content table; and a strong consistent node, configured to perform content update operations on the content, Sending an update request to the virtual server VS of the content; a weakly consistent node, configured to send a version verification request, when the version is the latest version of the content, perform a content update operation, and send an update request to the VS of the content; and the control node is configured to detect the content When the VS fails to leave, the content new VS is appointed, and when the content does not exist VS, the node that queried the content becomes the vs of the content.

本发明实施例一方面提出一种弱一致节点, 包括:  An embodiment of the present invention provides a weakly consistent node, including:

查询模块, 用于查找内容;  a query module for finding content;

路由转发模块, 用于根据存储的需求内容表进行消息的路由转 发;  a route forwarding module, configured to perform route routing of the message according to the stored content table of requirements;

第一更新操作模块, 用于发送版本验证请求, 在所述版本为所述 内容的最新版本时, 进行内容更新操作, 向所述内容的 VS发送更新 请求。  The first update operation module is configured to send a version verification request, and when the version is the latest version of the content, perform a content update operation, and send an update request to the VS of the content.

本发明实施例一方面提出一种强一致节点, 包括:  An embodiment of the present invention provides a strong consistent node, including:

查询模块, 用于查找内容;  a query module for finding content;

路由转发模块, 用于根据存储的需求内容表进行消息的路由转 发;  a route forwarding module, configured to perform route routing of the message according to the stored content table of requirements;

第二更新操作模块, 用于对所述内容进行内容更新操作, 向所述 内容的 VS发送更新请求。  And a second update operation module, configured to perform a content update operation on the content, and send an update request to the VS of the content.

本发明实施例一方面提出一种虚拟服务器, 包括:  An embodiment of the present invention provides a virtual server, which includes:

查询模块, 用于查找内容;  a query module for finding content;

路由转发模块, 用于根据存储的需求内容表进行消息的路由转 发;  a route forwarding module, configured to perform route routing of the message according to the stored content table of requirements;

聚类管理模块, 用于在接受对所述内容的更新请求, 探测到所述 内容的 CP或所述内容的 CRP失效离开时,根据存储的所述需求内容 表进行所述内容的聚类管理。  a clustering management module, configured to perform clustering management of the content according to the stored demand content table when accepting an update request for the content, detecting that the CP of the content or the CRP of the content fails to leave .

本发明实施例一方面提出一种控制节点, 包括:  An embodiment of the present invention provides a control node, which includes:

查询模块, 用于查找内容;  a query module for finding content;

路由转发模块, 用于根据存储的需求内容表进行消息的路由转 发; 第三探测模块, 用于每隔一次计时器周期探测所述内容的 VS是 否存活; a route forwarding module, configured to perform routing and forwarding of messages according to the stored content table of requirements; a third detecting module, configured to detect whether the VS of the content is alive every other timer period;

任命管理模块, 用于在所述第三探测模块探测到所述内容的 VS 失效离开时, 任命所述内容新的 VS, 当所述内容不存在 VS时, 任 命查询所述内容的节点成为所述内容的 vs。  An appointment management module, configured to appoint the content new VS when the third detection module detects that the VS of the content is detached, and when the content does not exist VS, appoint a node that queries the content to become The content of the vs.

与现有技术相比, 本发明实施例的技术方案具有以下优点: 本发明实施例通过构建一个内容及其副本和路由信息可以形成 具有规则拓朴结构的网络, 使内容在网络中稳定分布; 保证内容查找 的高效性; 对内容及其副本进行有效的更新和控制, 保证内容及其副 本的有效性;以及在节点发生迁移和更替以及节点对内容的需求发生 变化时, 降^ 对整个网络的影响。 附图说明  Compared with the prior art, the technical solution of the embodiment of the present invention has the following advantages: The embodiment of the present invention can form a network with a regular topology structure by constructing a content and its copy and routing information, so that the content is stably distributed in the network; Ensure the efficiency of content search; effectively update and control the content and its copy, ensure the validity of the content and its copy; and reduce the entire network when the node moves and replaces and the node's content needs change Impact. DRAWINGS

图 1为本发明实施例中的双层结构示意图;  1 is a schematic diagram of a two-layer structure in an embodiment of the present invention;

图 2为本发明实施例中的节点之间邻接连接示意图;  2 is a schematic diagram of adjacency connection between nodes in an embodiment of the present invention;

图 3为本发明实施例中的节点的数据结构;  3 is a data structure of a node in an embodiment of the present invention;

图 4为本发明实施例一中的分布式网络的管理方法流程示意图; 图 5为本发明实施例二中的 CAN路由示意图;  4 is a schematic flowchart of a method for managing a distributed network according to Embodiment 1 of the present invention; FIG. 5 is a schematic diagram of CAN routing in Embodiment 2 of the present invention;

图 6为本发明实施例二中的改进路由示意图;  6 is a schematic diagram of an improved route in Embodiment 2 of the present invention;

图 7 为本发明实施例二中的单个节点接收到查询请求之后的处 理流程示意图;  FIG. 7 is a schematic flowchart of processing after a single node receives a query request according to Embodiment 2 of the present invention;

图 8 为本发明实施例二中的节点进行内容查找和获取的流程示 意图;  8 is a schematic flow chart of a node performing content search and acquisition according to a second embodiment of the present invention;

图 9 为本发明实施例三中的节点进行内容更新和发布的流程示 意图;  FIG. 9 is a schematic flowchart of a node performing content update and release according to a third embodiment of the present invention;

图 10为本发明实施例四中的 CP正常离开时的时序图; 图 11为本发明实施例四中的 CP非正常离开时的时序图; 图 12为本发明实施例四中的 VS离开正常离开时的时序图; 图 13为本发明实施例四中的 VS离开非正常离开时的时序图; 图 14为本发明实施例五中的 IRP转换为 CRP的时序图; 图 15为本发明实施例五中的 CRP转换为 IRP的时序图; 图 16为本发明实施例中的一种弱一致节点示意图; FIG. 10 is a timing diagram of a normal departure of a CP in Embodiment 4 of the present invention; FIG. 11 is a timing diagram of a CP in a normal departure according to Embodiment 4 of the present invention; FIG. 13 is a timing diagram of the VS in the fourth embodiment of the present invention when leaving the abnormal departure; FIG. 14 is a timing diagram of converting an IRP into an IRP according to Embodiment 5 of the present invention; FIG. 15 is a timing diagram of converting a CRP into an IRP according to Embodiment 5 of the present invention; FIG. 16 is a weak consensus node according to an embodiment of the present invention; schematic diagram;

图 17为本发明实施例中的一种强一致节点示意图;  17 is a schematic diagram of a strong consistent node in an embodiment of the present invention;

图 18为本发明实施例中的一种虚拟服务器示意图;  FIG. 18 is a schematic diagram of a virtual server according to an embodiment of the present invention; FIG.

图 19为本发明实施例中的一种控制节点示意图。 具体实施方式  FIG. 19 is a schematic diagram of a control node according to an embodiment of the present invention. detailed description

本发明实施例提供一种分布式网络的管理方法及装置。  Embodiments of the present invention provide a method and an apparatus for managing a distributed network.

下面结合附图和实施例, 对本发明的具体实施方式作进一步 详细描述:  The specific embodiments of the present invention are further described in detail below with reference to the accompanying drawings and embodiments.

如图 1 所示, 本发明的实施例从逻辑上将系统分成层结构, 上层为内容分布,下层为节点分布。节点之间采用 CAN ( Controller Area Network, 即控制器局域网) 建立 d维键值 (注册表里面的所 有信息是以各种形式的键值项数据保存下来,键值项由键值名、数据 类型和键值三部分组成, 其格式为: "键值名: 数据类型: 键值")空 间的基本路由分布, 内容则根据 DHT ( Distributed Hash Table , 分 布式哈希表) 机制映射到键值最接近的节点上, 一个内容和多个 节点形成了一对多的关系。  As shown in FIG. 1, the embodiment of the present invention logically divides the system into a layer structure, with the upper layer being the content distribution and the lower layer being the node distribution. Nodes use CAN (Controller Area Network) to establish d-dimensional key values. (All information in the registry is saved in various forms of key-value item data. Key-value items are represented by key-value names and data types. And the key value is composed of three parts, the format is: "key name: data type: key value") The basic route distribution of the space, and the content is mapped to the key value according to the DHT (Distributed Hash Table) mechanism. On a close node, one content and multiple nodes form a one-to-many relationship.

如图 1所示, 每个内容通过 DHT映射到一个键值最接近的节 点上, 这个节点称为该内容的 CAN CP ( Control Peer, 控制节点), 节点 PI是内容 A的 CP, 每一个内容在系统同时有且唯一的 CP。 CP本身并不负责内容的管理和更新, 而是作为一个备份节点保存 内容的信息, 并作为查询时的索引节点。  As shown in Figure 1, each content is mapped by DHT to a node with the closest key value. This node is called the CAN CP (Control Peer) of the content, and the node PI is the CP of content A, each content. There is a unique CP at the same time in the system. The CP itself is not responsible for the management and update of the content, but serves as a backup node to store the information of the content and serves as the index node for the query.

每个内容可能会被其他节点需要, 这些节点对内容进行访问, 存储了该内容, 称为该内容的副本, 并可能对内容进行操作或更 新, 这些节点称为该内容的 RP ( Replica Peer, 复制节点), 如图 1 中与内容虚线连接的节点就是 RP, 节点 P2、 P3、 P4、 P6都是内 容 A的 RP。 RP作用是: 通过建立层次结构完成对内容以及副本 的维护和更新。 RP分为三类: VS ( Virtual Server, 虚拟服务器)、 CRP( Control Replica Peer,强一致节点 )、 IRP( Infirm Replica Peer, 弱一致节点 )。 Each content may be needed by other nodes that access the content, store the content, called a copy of the content, and possibly manipulate or update the content. These nodes are called RPs for the content (Replica Peer, Copy node), as shown in Figure 1, the node connected to the dotted line is the RP, and nodes P2, P3, P4, and P6 are all inside. Rong A's RP. The role of RP is to: Maintain and update content and replicas by establishing a hierarchy. There are three types of RPs: VS (Virtual Server), CRP (Control Replica Peer), and IRP (Infirm Replica Peer).

VS是从 RP中选出来的一个普通节点, 负责对内容进行更新 并发布。 VS和 CP保持双向连接, 并周期性的探测存活。  VS is a normal node selected from the RP and is responsible for updating and publishing the content. The VS and CP maintain a two-way connection and periodically detect survival.

CRP是和 VS保持强一致的节点, CRP上存储的内容副本一 直保持最新版本, 在内容更新后, CRP会接收到 VS发布的更新信 息。 CRP和 VS之间保持双向连接, 并保持定时器, 在一定周期内 若没有交互信息, 则会主动发送信息探测存活。  CRP is a node that is consistent with VS. The copy of the content stored on the CRP remains the latest version. After the content is updated, CRP will receive the update information released by the VS. The CRP maintains a bidirectional connection with the VS and maintains a timer. If there is no interaction information within a certain period, it will actively send information to detect the survival.

IRP是和 VS保持弱一致的节点, IRP上存储的副本可能是旧 版本,在内容发生更新后,不会接收到 VS发布的更新信息。在 IRP 使用内容前, 需要先向 VS验证版本信息来保持内容的一致性。  The IRP is a weakly consistent node with the VS. The copy stored on the IRP may be an old version. After the content is updated, the update information released by the VS will not be received. Before the IRP uses the content, you need to verify the version information with VS to maintain the consistency of the content.

本发明实施例中的节点和节点之间的连接分为两类: 邻接连 接和远程连接。 邻接连接是指根据 CAN的路由分布产生的相邻节 点之间的连接, 比如图 2中节点 P2和 P3之间的连接。 远程连接 是指根据节点对内容的需求产生的需求内容的节点之间以及和负 责内容节点之间的连接, 比如图 1 中节点 P1和 P4之间的连接。 CP和 RP之间的连接, VS和 CRP以及 IRP之间的连接都是远程 连接。 远程连接可能是双向的, 比如 CP和 VS之间的连接, 也可 能是单向的, 比如 VS和 IRP之间的连接。 远程连接相当于小世界 理论中的 "捷径", 可以降低查询路径长度。  The connections between nodes and nodes in the embodiments of the present invention fall into two categories: adjacency connections and remote connections. Adjacency connection refers to the connection between adjacent nodes generated according to the routing distribution of CAN, such as the connection between nodes P2 and P3 in Figure 2. Remote connection refers to the connection between the nodes of the required content generated by the node's demand for content and the responsible content node, such as the connection between nodes P1 and P4 in Figure 1. The connection between the CP and the RP, the connection between the VS and the CRP and the IRP are remote connections. The remote connection may be bidirectional, such as a connection between the CP and the VS, or it may be unidirectional, such as a connection between VS and IRP. Remote connection is equivalent to the "shortcut" in the small world theory, which can reduce the length of the query path.

在本发明实施例中, 对任意普通节点而言, 只要该节点负责 的键值空间内有内容存在, 该节点即作为 CP负责这些内容。 当该 节点需要其他内容并需要持续保持这些内容时, 该节点将成为内 容的 RP。 所以, 一个普通节点可能同时具有不同内容的 CP、 VS、 CRP, IRP这些身份; 对于同一内容, 节点可以是该内容的 CP、 VS、 CRP或 IRP等身份中的一种, 结构如图 3 , 包括: 自身的键值、 键 值空间范围、 结构路由表、 结构内容表、 需求内容表。 其中, 结构路由表由 CAN协议产生, 记录所有和该节点邻接 的节点的键值和地址信息。 在加入到结构化网络中的节点, 都有 一个路由表。 In the embodiment of the present invention, for any common node, as long as there is content in the key space occupied by the node, the node is responsible for the content as the CP. When the node needs other content and needs to keep it, the node becomes the RP of the content. Therefore, a common node may have the same content of CP, VS, CRP, and IRP of different contents; for the same content, the node may be one of the contents of the content such as CP, VS, CRP, or IRP, and the structure is as shown in FIG. 3 . Including: its own key value, key-value space range, structure routing table, structure content table, and requirements content table. The structure routing table is generated by the CAN protocol, and records the key value and address information of all nodes adjacent to the node. Nodes added to a structured network have a routing table.

结构内容表记录了该节点作为 CP负责的所有内容的信息, 包 括: 内容的键值, 内容的具体信息, 该内容相关的 VS的键值和地 址信息。  The structure content table records information about all the contents of the node as the CP, including: the key value of the content, the specific information of the content, the key value and address information of the VS related to the content.

需求内容表记录了该节点所需的所有内容的键值, 内容的具 体信息, 该内容所在的 CP的键值和地址信息。 若该节点是 VS , 则还保存了所有 CRP的键值和地址信息; 若该节点是所需内容的 CRP或 IRP, 则还保存了相关的 VS的键值和地址信息。  The demand content table records the key values of all the content required by the node, the specific information of the content, and the key value and address information of the CP where the content is located. If the node is VS, the key value and address information of all CRPs are also saved; if the node is a CRP or IRP of the desired content, the related VS key value and address information are also saved.

本发明实施例中, 通过节点之间邻接连接和远程连接, 实现 了路由信息的规则有效拓朴; 通过根据对内容的需求将节点分为 不同的类型, 实现了内容及其副本的规则拓朴。  In the embodiment of the present invention, the rule effective topology of the routing information is realized by the adjacency connection and the remote connection between the nodes; the rule topology of the content and the copy thereof is realized by dividing the nodes into different types according to the requirements of the content. .

本发明实施例一提供一种分布式网络的管理方法, 如图 4 所 示, 包括:  A first embodiment of the present invention provides a method for managing a distributed network. As shown in FIG. 4, the method includes:

步骤 s401 , 当节点加入分布式网络时, 通过查找内容, 生成所 述内容的需求内容表。  Step s401: When the node joins the distributed network, the content table of the content of the content is generated by searching for content.

步骤 s402, 根据所述需求内容表进行消息的路由转发。 具体 为:根据步骤 s401之前生成的结构路由表和结构内容表,及步骤 s401 生成的所述需求内容表进行消息的路由转发。  Step s402: Perform routing and forwarding of the message according to the required content table. Specifically, the routing and forwarding of the message are performed according to the structure routing table and the structure content table generated before the step s401, and the required content table generated in step s401.

该步骤具体包括:  This step specifically includes:

步骤 S402.1 , 所述节点接收内容的查询请求, 所述查询请求携 带所述内容的键值。  Step S402.1: The node receives a query request for content, and the query request carries a key value of the content.

步骤 S402.2,当所述节点的键值管理范围不包括所述内容的键 值时, 所述节点根据本地存储的结构路由表、 结构内容表、 以及 需求内容表获取与所述内容的键值距离最小的节点, 向与所述内 容的键值距离最小的节点转发所述查询请求;  Step S402.2, when the key value management range of the node does not include the key value of the content, the node acquires a key with the content according to the locally stored structure routing table, the structure content table, and the requirement content table. a node having the smallest value distance, and forwarding the query request to a node having the smallest distance from the content of the content;

步骤 S402.3 , 当所述节点的键值管理范围包括所述内容的键值 时, 所述节点为所述查询内容的 CP, 当所述内容不存在 VS时, 所 述节点成为所述内容的 VS, 并与所述内容的 CP建立双向连接; 当 所述内容存在 VS时, 所述节点成为所述内容的 IRP, 并与所述内容 的 VS建立连接。 Step S402.3, when the key value management range of the node includes the key value of the content, the node is the CP of the query content, when the content does not exist VS, the The node becomes a VS of the content, and establishes a bidirectional connection with the CP of the content; when the content exists in the VS, the node becomes an IRP of the content, and establishes a connection with the VS of the content.

步骤 s403 , 当节点为所述内容的虚拟服务器 VS时,根据所述 需求内容表进行所述内容的聚类管理。 该聚类管理包括: 内容的 查找和获取, 内容的更新和发布, 节点的加入和离开, CRP和 IRP 的管理。  Step s403: When the node is the virtual server VS of the content, performing cluster management of the content according to the required content table. The cluster management includes: content search and retrieval, content update and release, node join and leave, CRP and IRP management.

本实施例中, 通过结构路由表、 结构内容表、 以及需求内容 表实现对内容的快速定位和查找, 通过该内容的 VS 进行聚类管 理, 保证了该内容的 CRP上存储的信息保持一致性。  In this embodiment, the content routing table, the structure content table, and the requirement content table are used to quickly locate and search the content, and the VS of the content is used for cluster management, thereby ensuring that the information stored on the CRP of the content remains consistent. .

下面通过具体的实施例对内容的查找和获取、 内容的更新和 发布、 节点的加入和离开、 CRP和 IRP的管理进行详细描述。  The following describes the content search and acquisition, content update and release, node join and leave, CRP and IRP management in detail through specific embodiments.

实施例二、 内容的查找和获取  Embodiment 2: Searching and obtaining content

由于节点上不仅存储了邻居节点的信息, 还因为远程连接而 存储了一些远处节点的信息, 这些远程连接相当于 small-world中 的"捷径", 通过将这些"捷径"和 CAN的路由算法相结合, 可以获 得较小的平均查询路径长度。  Since the node not only stores the information of the neighbor nodes, but also stores the information of some distant nodes because of the remote connection, these remote connections are equivalent to the "shortcut" in small-world, by routing these "shortcuts" and CAN routing algorithms. Combined, a smaller average query path length can be obtained.

当一个节点需要内容时, 通过内容的键值进行路由, 搜索所 有的邻接连接和远程连接, 寻找键值最为接近的节点发送询问请 求, 如此反复转发, 直到找到负责该内容的 CP。 这种查找过程不 同于 CAN在键值空间连续的逼近目的地,而是存在跳跃式的逼近。 比如节点 P5需要查找内容 A, 如果是通过 CAN的路由算法, 则 查找沿 P5_>P4_>P3_>P1_>A的路径找到内容 A,如图 5所示。 但若 P4 和 P1 之间存在聚类连接, 则 查找可以 沿 P5_>P4_>P1_>A的路径找到内容 A, 如图 6所示。  When a node needs content, it routes through the key value of the content, searches for all adjacency connections and remote connections, and finds the node with the closest key value to send a query request, and then repeats it until it finds the CP responsible for the content. This search process is different from the continuous approach of the CAN in the key-value space, but there is a jump approximation. For example, node P5 needs to find content A. If it is a routing algorithm through CAN, find the content A along the path of P5_>P4_>P3_>P1_>A, as shown in Figure 5. However, if there is a cluster connection between P4 and P1, the search can find content A along the path of P5_>P4_>P1_>A, as shown in Figure 6.

单个节点接收到查询信息之后的处理流程如图 7 所示, 对应 的程序处理过程如下:  The processing flow after a single node receives the query information is shown in Figure 7. The corresponding program processing is as follows:

Receive Search ( Key, Address )〃节点 P接收到地址为 Address的 节点查找键值为 Key内容的请求 If ( Key属于节点 P的键值范围)〃自身是目标节点 Receive Search (Key, Address)〃 Node P receives a request for the node whose address is Address is the key content. If (Key belongs to the range of key values of node P) 〃 itself is the target node

return (内容信息, 内容的 CP信息, 内容的 VS地址) else//自身不是目标节点  Return (content information, CP information of the content, VS address of the content) else / / itself is not the target node

PeerNearest=P; PeerNearest=P;

For (分别取出所有邻居节点 ( NeighborP ) in CAN路由表) If ( Distance ( NeighborP, Key ) ) <Distance ( PeerNearest, Key ) )  For (Retrieve all neighbor nodes (NeighborP) in CAN routing table) If ( Distance ( NeighborP, Key ) ) <Distance ( PeerNearest, Key ) )

PeerNearest=NeighborP;  PeerNearest=NeighborP;

For ( all作为 CP负责的内容 in CAN内容表)  For (all as the responsibility of the CP in the CAN content table)

If ( Distance ( 该内 容的 VS , Key ) <Distance ( PeerNearest, Key )  If ( Distance ( VS , Key ) of the content <Distance ( PeerNearest, Key )

PeerNearest :内容的 VS;  PeerNearest: the VS of the content;

For ( all内容 in所需内容表 )  For (all content in required content table)

If ( P是该内容的 VS ) If (P is the VS of the content)

If ( Distance (该内容的 CP , Key ) <Distance ( PeerNearest, Key ) If ( Distance (CP of the content, Key) <Distance ( PeerNearest, Key )

PeerNearest :内容的 CP;  PeerNearest: the content of the CP;

For (所有该内容的 CRP )  For (all CRP for this content)

If ( Distance (该内容的 CRP , Key ) <Di ( PeerNearest, Key )  If ( Distance (CRP of the content, Key) <Di ( PeerNearest, Key )

PeerNearest 内容的 CRP; else 〃P是该内容的 CRP或 IRP  CRP of the PeerNearest content; else 〃P is the CRP or IRP of the content

If ( Distance ( 该内容的 CP , Key ) <Distance ( PeerNearest, Key ) If ( Distance (CP of the content, Key) <Distance ( PeerNearest, Key )

PeerNearest :内容的 CP;  PeerNearest: the content of the CP;

If ( Distance (该内容的 VS , Key ) <Distance ( PeerNearest, Key )  If ( Distance ( VS , Key ) of the content <Distance ( PeerNearest, Key )

PeerNearest=i :内容的 VS;  PeerNearest=i: the VS of the content;

Transmit Search ( Key, Address ) to PeerNearest〃向当前所有关 联节点键值距离目标节点最近的节点转发 Transmit Search ( Key, Address ) to PeerNearest forwards the node whose current associated node key is closest to the target node.

Distance ( P, Key )〃节点 P和目标键值 Key之间的距离 distance=0; Distance ( P, Key )〃 The distance between the node P and the target key value Key distance=0;

for ( i=l ; i<=d; i++ ) //d是键值空间的维数  For ( i=l ; i<=d; i++ ) //d is the dimension of the key-value space

distanced节点 P在第 i维的键值 -Key在第 i维的键值; 节点根据结构路由表、 结构内容表、 以及需求内容表进行消息的 路由转发包括:  The distanced node P is the key value of the i-th dimension - the key value of the key in the i-th dimension; the routing of the message by the node according to the structure routing table, the structure content table, and the requirement content table includes:

步骤 s701 , 节点 P接收查询请求。 该请求包含原节点的地址 信息 (Address ) 以及查找内容的键值 ( Key )。  Step s701, the node P receives the query request. The request contains the address information (Address ) of the original node and the key value ( Key ) of the search content.

步骤 s702 , 判断查找内容的键值是否在节点 P的键值管理范 围, 是则节点 P为该查询请求的目标节点, 即该查找内容的 CP, 转步骤 s703 , 否则为该查询请求的中继节点, 转步骤 s704。  Step s702: Determine whether the key value of the search content is in the key value management range of the node P, if the node P is the target node of the query request, that is, the CP of the search content, go to step s703, otherwise, the relay of the query request Node, go to step s704.

步骤 s703 , 向原节点返回查找内容的元数据和该查找内容的 Step s703, returning metadata of the search content to the original node and the content of the search content

VS地址信息。 VS address information.

步骤 s704 ,从 CAN路由表中获取与该查找内容键值距离最小 的节点。  Step s704: Obtain a node with the smallest distance from the search content key value from the CAN routing table.

步骤 s705 ,从 CAN内容表中获取与该查找内容键值距离最小 的节点。 Step s705, obtaining a minimum distance from the CAN content table and the search content key value Node.

步骤 s706 , 从需求内容表中获取与该查找内容键值距离最小 的节点。  Step s706: Obtain a node with the smallest distance from the search content key value from the requirement content table.

步骤 s707 , 从步骤 s704~s706 中获取与该查找内容键值距离 最小的节点, 向与该查找内容键值距离最小的节点继续转发该查 询请求。  Step s707: Obtain a node having the smallest distance from the search content key value from steps s704 to s706, and continue forwarding the query request to the node having the smallest distance from the search content key.

当该节点查找到所需的内容之后, CP直接将该内容的具体信 息以及该内容的 VS 地址返回。 如果该节点只是需要内容当前的 值, 而不需要关注该内容信息的变化或对该内容进行操作, 则仅 存储返回的内容并使用。 如图 8 所示, 如果该节点需要持续的关 注该内容或对内容进行操作, 则该节点和 VS建立连接, 成为该内 容的 IRP节点。 如果该内容还没有 RP, 且不存在 VS , 则该节点 从 CP获得内容的具体信息, 自动成为该内容的 VS , 和 CP建立双 向连接, 该内容的 VS根据需求内容表进行该内容的聚类管理。 本实 施例中, 通过聚类连接和按内容键值进行路由的方法, 保证了内 容查找的高效性。  After the node finds the desired content, the CP directly returns the specific information of the content and the VS address of the content. If the node only needs the current value of the content, and does not need to pay attention to the change or operation of the content information, only the returned content is stored and used. As shown in Figure 8, if the node needs to continuously focus on the content or operate on the content, the node establishes a connection with the VS and becomes the IRP node of the content. If the content does not have an RP, and there is no VS, the node obtains specific information of the content from the CP, automatically becomes the VS of the content, and establishes a bidirectional connection with the CP, and the VS of the content performs clustering of the content according to the demand content table. management. In this embodiment, the method of clustering connections and routing by content key values ensures the efficiency of content search.

图 8包括如下步骤:  Figure 8 includes the following steps:

步骤 s801 , 根据该内容的键值, 搜索结构路由表、 内容路由 表、 以及需求内容表, 找到键值最接近的节点发送查询请求。  Step s801: Search the structure routing table, the content routing table, and the requirement content table according to the key value of the content, and find the node with the closest key value to send the query request.

步骤 s802, 经过若干次转发找到该内容的 CP, 获取该内容及 该内容的 VS的地址信息。  Step s802: After a number of times of forwarding, the CP that finds the content obtains the content and the address information of the VS of the content.

步骤 s803 , 判断是否需要持续关注内容的变化或对该内容进 行操作, 是则转步骤 s805 , 否则转步骤 s804。  In step s803, it is judged whether it is necessary to continuously pay attention to the change of the content or operate the content, if yes, go to step s805; otherwise, go to step s804.

步骤 s804, 存储并使用该内容。  Step s804, storing and using the content.

步骤 s805 ,进一步判断该内容是否已有 VS ,是则转步骤 s806, 否则, 转步骤 S807。 Step S805, the content has been further determined whether VS, then go to step S806 is, otherwise, go to step S 807.

步骤 s806, 成为该内容的 IRP, 和 VS建立连接。  Step s806, becoming an IRP of the content, establishing a connection with the VS.

步骤 s807 , 成为该内容的 VS , 和 CP建立双向连接。  Step s807, becomes the VS of the content, and establishes a bidirectional connection with the CP.

本实施例实现节点的快速定位和查找内容, 通过该内容的分 布情况, 获取该内容的节点可成为该内容的 VS或 IRP, 以对该内 容持续进行关注或操作。 In this embodiment, the node is quickly located and the content is searched, and the content is divided. In the case of a cloth, the node that obtains the content may become a VS or an IRP of the content to continue to pay attention or operate on the content.

实施例三、 内容的更新和发布  Example 3, content update and release

由于所有内容的 RP上都会保存一份该内容的副本,所以整个 网络中会存在内容的多个副本。 为了保证所有节点都能在较低的 通信量下, 获得新的有效的内容并能对内容进行合法的操作, 本 发明使用了一种混合 push/pull的内容更新和发布协议对内容及其 副本进行控制和更新。  Since a copy of the content is kept on the RP for all content, multiple copies of the content exist throughout the network. In order to ensure that all nodes can obtain new and effective content and perform legitimate operations on the content under lower traffic, the present invention uses a mixed push/pull content update and distribution protocol for content and its copy. Control and update.

为了降低通信量, 本发明实施例根据节点对内容的需求频率 决定对该节点的类型, 将频繁访问内容的节点设置为 CRP, 将较 少访问内容的节点设置为 IRP。 而且, 为了能在内容更新之后区分 内容的不同版本, 每个内容都有一个版本号, 该内容的 VS在每次 合法更新之后对版本号进行操作。  In order to reduce the traffic, the embodiment of the present invention determines the type of the node according to the frequency of the node's demand for the content, sets the node that frequently accesses the content to CRP, and sets the node that accesses the content to the IRP. Moreover, in order to be able to distinguish different versions of the content after the content is updated, each content has a version number, and the VS of the content operates on the version number after each legal update.

整个内容更新和发布过程分为三步: 更新请求, 更新审核, 更新发布。 基本流程如图 9所示:  The entire content update and release process is divided into three steps: update request, update review, update release. The basic process is shown in Figure 9:

步骤 s901 , 更新请求。  Step s901, update the request.

当一个 RP要对内容进行操作时, 首先会判断自身的类型。 如 果是 CRP, 则该节点本身就存储了内容的最新版本, 可以直接对 内容进行操作, 并向 VS发送更新请求, 该请求包括: 操作结果和 当前的版本号。 如果是 IRP, 则该节点上存储的副本可能是陈旧版 本, 需要向 VS发送当前版本号来检测版本信息, 如果该版本号和 VS上存储的当前版本一致, 则 VS返回确认信息, 如果不一致, 则 VS返回当前最新版本的内容信息。 此后 IRP采用和 CRP同样 的方式对内容进行操作并发出更新请求。  When an RP wants to operate on content, it first determines its type. If it is CRP, the node itself stores the latest version of the content, can directly operate on the content, and sends an update request to the VS, the request includes: the operation result and the current version number. If it is an IRP, the copy stored on the node may be an old version. The current version number needs to be sent to the VS to detect the version information. If the version number is the same as the current version stored on the VS, the VS returns a confirmation message. Then VS returns the content information of the current latest version. The IRP then operates on the content and issues an update request in the same way as CRP.

步骤 s902, 更新审核。  Step s902, update the audit.

VS接收到更新的内容后, 先判断内容的版本号是否是最新的 版本号, 如果是, 则接受更新并修改版本号, 同时返回确认信息; 否则, 拒绝更新, 并返回最新版本信息。 如果有两个 RP同时提交 更新结果, VS根据更新请求的时间戳判定更新的有效性。 例如: 接受时间戳较早的更新。 After receiving the updated content, the VS first determines whether the version number of the content is the latest version number, and if so, accepts the update and modifies the version number, and returns a confirmation message; otherwise, the update is rejected, and the latest version information is returned. If two RPs submit the update results at the same time, the VS determines the validity of the update based on the timestamp of the update request. E.g: Accept older updates with timestamps.

步骤 s903 , 更新发布。  Step s903, update the release.

在 VS接受更新之后,会将更新后的内容和新的版本号发送给 CP和所有 CRP。 由于 IRP和 VS之间是弱一致关系, 所以并不需 要向 IRP发布更新信息。  After the VS accepts the update, the updated content and the new version number are sent to the CP and all CRPs. Since there is a weak agreement between IRP and VS, there is no need to release updates to the IRP.

本实施例中, 通过该内容的 VS发布更新信息, 实现了网络中 该内容的 CRP存储的该内容的副本信息保持一致。  In this embodiment, the VS is released with the update information of the content, so that the copy information of the content stored in the CRP of the content in the network is consistent.

实施例四、 节点的加入与离开  Embodiment 4: Joining and leaving a node

若节点希望加入网络, 则可以通过 CAN中的节点加入算法, 完成节点加入过程。 节点加入分布式网络, 生成结构路由表和结 构内容表; 如果该节点被分配到的键值空间内有内容存在, 则该 节点自动成为内容的 CP。 当该节点请求查找其他内容时, 才会通 过路由查找协议进一步成为其他内容的 RP,当该节点查找内容时, 生成该内容的需求内容表。 整个节点加入过程, 仅会影响节点最 后所在位置周围的邻居节点, 而对网络中绝大多数节点都不会产 生影响。  If the node wants to join the network, it can join the algorithm through the node in the CAN to complete the node joining process. The node joins the distributed network to generate a structure routing table and a structure content table; if there is content in the key space to which the node is assigned, the node automatically becomes the CP of the content. When the node requests to find other content, it will further become the RP of other content through the route lookup protocol. When the node searches for content, it generates a content table of the content of the content. The entire node join process only affects the neighbor nodes around the node's last location, and does not affect most nodes in the network.

一个节点离开网络, 可能会造成 CP的更替、 VS的更替以及 CRP 数量改变。 所以根据节点的不同身份, 节点正常离开网络和 失效离开网络会有不同的处理方式。  A node leaving the network may cause a change in CP, a change in VS, and a change in the number of CRPs. Therefore, depending on the identity of the node, the node will leave the network normally and will leave the network in a different way.

由于 CP和内容之间的映射是通过 DHT机制进行映射的, CP 和内容的键值不会变化, 所以只有当 CP离开系统或内容消失时, 才会发生 CP的更换。  Since the mapping between the CP and the content is mapped by the DHT mechanism, the key values of the CP and the content do not change, so the replacement of the CP occurs only when the CP leaves the system or the content disappears.

CP离开系统包括正常离开和失效离开两种。  The CP leaving the system includes both normal leaving and failing away.

正常离开: 如图 10所示, 当 CP正常离开时, CP所负责的键 值空间根据 CAN协议, 将归由 CP的邻接节点负责。 CP可以在键 值空间转移的同时, 将内容相关信息 (包括: 内容的具体信息, VS信息) 转移, 并通知 VS CP的更替。 VS在得知 CP更替之后, 将新的 CP信息发送给所有的 CRP节点。 虽然 IRP没有接收到 CP 更替的信息, 但可以在需要时通过询问 VS或通过 CAN路由找到 新的 CP。 Normal departure: As shown in Figure 10, when the CP leaves normally, the key space occupied by the CP is responsible for the adjacent node of the CP according to the CAN protocol. The CP can transfer content related information (including: specific information of the content, VS information) while transferring the key space, and notify the VS CP of the replacement. After learning the CP replacement, the VS sends the new CP information to all CRP nodes. Although the IRP does not receive information on CP replacement, it can be found by asking VS or via CAN routing when needed. New CP.

失效离开: 如图 11所示, 当 CP失效后, 邻接节点在得知该 节点失效后, 会自动瓜分该节点所负责的键值空间, 但并不知道 该键值空间上的内容信息。 由于 VS周期性的探测 CP是否存活, 在 CP失效时 VS会发现失效。在 VS发现 CP失效后,将内容信息 和自己的信息复制给新的 CP, 并通知所有 CRP CP的更替。  Failure to leave: As shown in Figure 11, after the CP fails, the neighboring node automatically divides the key space occupied by the node after learning that the node is invalid, but does not know the content information on the key space. Since the VS periodically detects whether the CP is alive, the VS will find a failure when the CP fails. After the VS finds that the CP has failed, it copies the content information and its own information to the new CP and notifies all CRP CPs of the replacement.

当 VS作为 RP离开时, 将发生 VS的更换, 包括正常更换和 失效更换。  When the VS leaves as an RP, VS replacement will occur, including normal replacement and failover.

正常更换: 如图 12所示, 当 VS要离开系统时, 将从剩下的 CRP 中选出一个性能较好的节点作为新的 VS , 将该内容所有的 CRP信息传递给新的 VS , 并将自己的离开以及新的 VS的信息发 送给所有的 CRP以及 CP。所有的 CRP以及 CP更新存储的 VS的 信息。 如果该 VS是内容的最后一个 CRP, 则仅向 CP发送自身离 开的信息, CP将删除 VS相关信息, 直至有新的节点成为 RP或有 原来的 IRP来询问 VS的信息而自动升级为 VS , 并从 CP获得内 容的最新版本信息。 此处性能较好的节点是指在线时间较长, 带 宽较大的节点, 当然也可以通过其他的标准选择 VS , 比如: 网络 延迟或地理位置等。  Normal replacement: As shown in Figure 12, when the VS wants to leave the system, a better performing node will be selected from the remaining CRPs as the new VS, and all CRP information of the content will be transmitted to the new VS, and Send your own departure and new VS information to all CRPs and CPs. All CRP and CP update the stored VS information. If the VS is the last CRP of the content, the information about the leaving of the CP is sent only to the CP, and the CP deletes the VS related information until the new node becomes the RP or the original IRP is used to query the VS information and is automatically upgraded to VS. And get the latest version information of the content from the CP. A node with better performance here refers to a node with a long online time and a large bandwidth. Of course, VS can also be selected through other standards, such as: network delay or geographical location.

失效更换:在下面 4种情况下会有节点发现 VS失效: 1、 CRP 计时器超时而探测 VS; 2、 CRP要提交更新; 3、 IRP需要使用内 容时验证内容版本状态; 4、 有新的 IRP加入时, CP返回原 VS的 地址信息, 当新的 IRP试图连接原 VS。 当节点发现 VS失效后, 会主动通知 CP。 CP接收到失效报告后, 会主动检测 VS , 确认失 效之后:  Failover replacement: In the following 4 cases, the node will find VS failure: 1. CRP timer expires and probes VS; 2. CRP needs to submit updates; 3. IRP needs to verify content version status when using content; 4. New When the IRP joins, the CP returns the address information of the original VS, when the new IRP attempts to connect to the original VS. When the node finds that the VS has failed, it will actively notify the CP. After receiving the failure report, the CP will actively detect the VS and confirm the failure:

如果前来报告的是 CRP ,则会将前来报告的节点设为新的 VS , 并将自身存储的内容信息作为内容的最新版本, 如图 13-A;  If the CRP is reported, the node to be reported will be set as the new VS, and the content information stored by itself will be the latest version of the content, as shown in Figure 13-A;

如果前来报告的是 IRP,则 CP等待 CRP的一次计时器周期等 待 CRP来报告, 此后处理同上, 如图 13-B;  If the IRP is reported, the CP waits for a CRP timer cycle to wait for the CRP to report, and thereafter processes the same as above, as shown in Figure 13-B;

如果前来报告的是 IRP, CP等待 CRP的一次计时器周期, 却 没有 CRP来报告, 则说明现在已没有 CRP存在, 则直接将前来报 告的 IRP置为新的 VS , 并将自身存储的内容作为最新版本发送给 新的 VS, 并将新 VS的信息发送给所有前来报告失效的 IRP, 如 图 13-C。 If the IRP is reported, the CP waits for a timer period of the CRP, but If there is no CRP to report, it means that there is no CRP, then the IRP that is reported to be directly set to the new VS, and the content stored by itself is sent to the new VS as the latest version, and the information of the new VS is sent to All IRPs that report failures are shown in Figure 13-C.

在此后如果有其他 IRP或 CRP前来报告原 VS失效, 则直接 将新 VS的地址信息发送给它们, 由它们重新连接新的 VS恢复以 前的拓朴关系。  After that, if other IRPs or CRPs come to report the original VS failure, the address information of the new VS is directly sent to them, and they reconnect to the new VS to restore the previous topology.

当 CRP正常离开网络时, 会主动通知 VS。 如果 CRP失效, 则 VS在经过一个时钟周期后也会发现该 CRP失效。 同时, 该内 容的 VS在该内容的 CRP正常离开或失效离开时,在该节点的内容需 求表中删除该正常离开或失效离开的 CRP的键值和地址信息。  When the CRP leaves the network normally, it will actively notify the VS. If the CRP fails, the VS will also find that the CRP has failed after one clock cycle. At the same time, the VS of the content deletes the key value and address information of the CRP that normally leaves or lapses in the content requirement table of the node when the CRP of the content leaves or leaves the content normally.

当 IRP正常离开或失效离开网络时, 对整个网络没有影响, 并不需要向任何节点通报或转移信息。  When the IRP leaves normally or fails to leave the network, it has no effect on the entire network and does not need to notify or transfer information to any node.

节点离开网络时, 首先会造成该节点负责的键值空间的重新 划分, 这仅会影响该节点的邻居节点。 此后, 根据该节点的类型 不同, 会产生不同的影响。 如果该节点是 CP, 则仅会影响到该内 容的 VS; 若该节点是 VS , 则会影响到该内容的 CP和所有 CRP; 若该节点是 CRP, 则仅会影响到该内容的 VS; 若该节点是 IRP, 则不会对其他节点产生影响。  When a node leaves the network, it first causes the key space of the node to be repartitioned, which only affects the neighbor nodes of the node. Thereafter, depending on the type of the node, different effects will occur. If the node is a CP, it only affects the VS of the content; if the node is a VS, it affects the CP of the content and all CRPs; if the node is a CRP, it only affects the VS of the content; If the node is an IRP, it will not affect other nodes.

本实施例中, 通过计时器周期性的探测、 或通过交互 (例如: 内容的查找、 验证)的方式发现该内容的 CP、 VS、 CRP正常或失 效离开, 形成稳定的分布。 当网络中持有该内容的节点发生更替 和迁移时, 保证不影响对该内容的查找和管理。 节点更替过程仅 会对该节点的邻居节点, 以及和特定内容相关的特定节点, 而整 个网络的大多数节点和内容都不会受到影响。 而且由于内容存储 在 VS和所有 CRP上, 且备份在 CP上, 所以即使节点突然失效, 内容也不会丟失。  In this embodiment, the CP, VS, and CRP of the content are normally or inactively separated by a periodic detection of the timer or by interaction (for example, content search and verification) to form a stable distribution. When a node that holds the content in the network is replaced and migrated, it is guaranteed that the search and management of the content is not affected. The node replacement process will only affect neighbor nodes of the node, as well as specific nodes related to specific content, and most nodes and content of the entire network will not be affected. And because the content is stored on the VS and all CRPs and backed up on the CP, the content is not lost even if the node suddenly fails.

实施例五、 CRP和 IRP管理  Example 5, CRP and IRP management

CRP和 IRP的区别在于对内容的访问频率。 节点刚刚成为 RP 时, 一般会作为 IRP加入, 如果某个 IRP频繁访问和使用内容, 则会被升级为 CRP。 如果某个 CRP对内容的访问频率降低了, 则 会被降级为 IRP。 The difference between CRP and IRP is the frequency of access to content. The node has just become an RP It is usually added as an IRP. If an IRP frequently accesses and uses content, it will be upgraded to CRP. If a CRP has less access to content, it will be downgraded to an IRP.

为了衡量 CRP/IRP对内容的访问频率, 每个 CRP/IRP都会纪 录自己最近一段时间内对内容的访问频率,并在向 VS发送信息时 捎带。 VS在接收到每个更新信息的请求时, 也会计算近来一段时 间内容更新的频率, 并根据内容更新的频率设定升级成为 CRP和 降级成为 IRP 的临界值。 升级和降级的临界值根据内容更新的频 率确定, 可以设置为正好等于内容更新的频率, 也可以将升级临 界值设置为内容更新的频率 * ( 1+p ), 将降级临界值设置为内容更 新频率 * ( l-p ), 此处, 0.5<ρ<1。  To measure the frequency of CRP/IRP access to content, each CRP/IRP records its frequency of access to content in the most recent period of time and piggybacks when sending messages to VS. When the VS receives a request for each update information, it also calculates the frequency of the content update for a recent period of time, and sets the threshold for upgrading to CRP and downgrading to IRP according to the frequency of the content update. The threshold for upgrade and downgrade is determined by the frequency of content update. It can be set to exactly equal to the frequency of content update. You can also set the upgrade threshold to the frequency of content update* ( 1+p ) and the downgrade threshold to content update. Frequency * ( lp ), where 0.5 < ρ < 1.

如果接收到某个 IRP 的信息中访问内容的频率大于升级临界 值, 则将该 IRP升级为 CRP。 VS会保留这个新 CRP的地址, 并 通知该节点已经被升级为 CRP, 附带计时器的初始设置。 该 RP接 收到升级信息之后, 修改自身状态, 初始化一个计时器开始计时。 如图 14所示。  If the frequency of accessing content in an IRP message is greater than the upgrade threshold, the IRP is upgraded to CRP. VS will keep the address of this new CRP and inform the node that it has been upgraded to CRP with the initial settings of the timer. After receiving the upgrade information, the RP modifies its own state and initializes a timer to start timing. As shown in Figure 14.

如果接收到某个 CRP的信息中访问内容的频率低于降级临界 值, 则将该 CRP降级为 IRP。 VS会删除该节点的相关信息, 并通 知该节点更改状态。 该节点接收到降级信息之后, 会更改自己的 状态, 并删除计时器, 如图 15所示。  If the frequency of accessing content in a CRP message is lower than the degradation threshold, the CRP is downgraded to an IRP. VS deletes the information about the node and notifies the node to change the status. After receiving the downgrade information, the node changes its state and deletes the timer, as shown in Figure 15.

本实施例中, 通过该内容的 VS对 IRP和 CRP的级别管理, 满足节点的晋级要求, 降低了向访问频率低的 CRP频繁地探测、 以及发布更新信息等导致的通信量, 同时, 也增强了用户体验。  In this embodiment, the VS-level management of the IRP and the CRP of the content satisfies the promotion requirements of the node, reduces the traffic caused by frequent detection of the CRP with low access frequency, and release of update information, and also enhances the traffic. The user experience.

本实施例中, 每个节点的远程连接数不是固定不变的, 而是 根据内容的热门程度不断变化的。 内容越热门, 需求内容的节点 数越多, 构建的远程连接数就越多, 可以进一步加快热门内容的 查找速率。  In this embodiment, the number of remote connections per node is not fixed, but is constantly changing according to the popularity of the content. The more popular the content, the more nodes there are, and the more remote connections are built, which can further speed up the search rate of popular content.

本发明实施例还提供一种分布式网络管理系统, 包括: 虚拟服 务器, 用于根据需求内容表进行所述内容的聚类管理; 强一致节点, 用于对所述内容进行内容更新操作,向所述内容的 VS发送更新请求; 弱一致节点, 用于发送版本验证请求, 在所述版本为所述内容的最新 版本时, 进行内容更新操作, 向所述内容的 VS发送更新请求; 控制 节点, 用于在探测到所述内容的 VS失效离开时, 任命所述内容新的 VS , 当所述内容不存在 VS时,任命查询所述内容的节点成为所述内 容的 vs。 The embodiment of the invention further provides a distributed network management system, comprising: a virtual server, configured to perform clustering management of the content according to a requirement content table; And performing a content update operation on the content, and sending an update request to the VS of the content; the weakly consistent node is configured to send a version verification request, and when the version is the latest version of the content, performing a content update operation, Sending an update request to the VS of the content; a control node, configured to appoint the new VS of the content when the VS of the content is detected to be detached, and appointing the content when the content does not exist The node becomes the vs of the content.

本发明实施例提供了一种弱一致节点, 如图 16所示, 包括: 查询模块 1 , 用于查找内容; 存储模块 2 , 用于存储结构路由表、 结构内容表以及根据查询模块 1 查找的内容生成的需求内容表; 路由转发模块 3 , 用于根据存储模块 2存储的所述结构路由表、 结 构内容表以及需求内容表进行消息的路由转发。 第一更新操作模 块 5 , 用于向存储模块 2发送版本验证请求, 在所述版本为所述内 容的最新版本时, 进行内容更新操作, 向所述内容的 VS发送更新 请求。  The embodiment of the present invention provides a weakly consistent node. As shown in FIG. 16, the method includes: a query module 1 for searching content; a storage module 2, configured to store a structure routing table, a structure content table, and a search according to the query module 1. The content generation requirement content table; the routing forwarding module 3 is configured to perform routing and forwarding of the message according to the structure routing table, the structure content table, and the requirement content table stored by the storage module 2. The first update operation module 5 is configured to send a version verification request to the storage module 2, and when the version is the latest version of the content, perform a content update operation, and send an update request to the VS of the content.

本发明实施例提供了一种强一致节点, 如图 17所示, 包括: 查询模块 1 , 用于查找内容; 存储模块 2, 用于存储结构路由表、 结构内容表以及根据查询模块 1 查找的内容生成的需求内容表; 路由转发模块 3 , 用于根据存储模块 2存储的所述结构路由表、 结 构内容表以及需求内容表进行消息的路由转发。 第二更新操作模 块 15 , 用于对所述内容进行内容更新操作, 向所述内容的 VS发 送更新请求。 第一探测模块 20 , 用于每隔一次计时器周期探测所 述内容的 VS是否存活。 第一报告模块 25 , 用于在第一探测模块 20探测到所述内容的 VS失效离开时, 向所述内容的 CP报告所述 内容的 VS失效离开。  The embodiment of the present invention provides a strong consistent node. As shown in FIG. 17, the method includes: a query module 1 for searching for content; a storage module 2, configured for storing a structure routing table, a structure content table, and searching according to the query module 1 The content generation requirement content table; the routing forwarding module 3 is configured to perform routing and forwarding of the message according to the structure routing table, the structure content table, and the requirement content table stored by the storage module 2. The second update operation module 15 is configured to perform a content update operation on the content, and send an update request to the VS of the content. The first detecting module 20 is configured to detect whether the VS of the content is alive every other timer period. The first reporting module 25 is configured to report to the CP of the content that the VS of the content fails to leave when the first detecting module 20 detects that the VS of the content fails to leave.

本发明实施例提供了一种虚拟服务器, 如图 18所示, 包括: 查询模块 1 , 用于查找内容; 存储模块 2, 用于存储结构路由表、 结构内容表以及根据查询模块 1 查找的内容生成的需求内容表; 路由转发模块 3 , 用于根据存储模块 2存储的所述结构路由表、 结 构内容表以及需求内容表进行消息的路由转发。版本验证模块 25 , 用于在接收到所述内容的 IRP发送的版本验证请求时验证所述内 容的 IRP版本是否是所述内容的最新版本; 更新审核模块 26, 用 于在接收到所述内容的更新请求后, 判断所述内容的版本号是否 是最新的版本号, 如果是, 则接受对所述内容的更新操作并修改 所述内容的版本号; 在接收到对所述内容进行内容更新操作的多 个更新请求时, 根据所述更新请求的时间戳进行更新审核; 第二 探测模块 27 ,用于每隔一次计时器周期探测所述内容的 CP和所述 内容的 CRP是否存活; 聚类管理模块 28, 用于在更新审核模块 26 接受对所述内容的更新请求, 第二探测模块 27探测到所述内容的 CP或所述内容的 CRP失效离开时,根据存储模块 2存储的所述需 求内容表进行所述内容的聚类管理; 级别管理模块 29, 用于在所 述内容的 IRP 的访问频率高于设定的升级临界值时将所述内容的 IRP升级为所述内容的 CRP; 在所述内容的 CRP的访问频率低于 设定的降级临界值时将所述内容的 CRP降级为所述内容的 IRP。 The embodiment of the present invention provides a virtual server, as shown in FIG. 18, including: a query module 1 for searching content; a storage module 2, configured to store a structure routing table, a structure content table, and content searched according to the query module 1 The generated request content table; the route forwarding module 3 is configured to perform routing and forwarding of the message according to the structure routing table, the structure content table, and the requirement content table stored by the storage module 2. Version verification module 25, Determining whether the IRP version of the content is the latest version of the content when receiving the version verification request of the IRP of the content; the update review module 26, after receiving the update request of the content, Determining whether the version number of the content is the latest version number, if yes, accepting an update operation on the content and modifying a version number of the content; receiving multiple updates to the content update operation on the content When the request is made, the update audit is performed according to the timestamp of the update request; the second detecting module 27 is configured to detect whether the CP of the content and the CRP of the content are alive every other timer period; the cluster management module 28, For receiving the update request for the content in the update auditing module 26, the second detecting module 27 detects that the CP of the content or the CRP of the content fails to leave, according to the required content table stored by the storage module 2 a cluster management of the content; a level management module 29, configured to upgrade an IRP of the content when an access frequency of the content of the IRP is higher than a set upgrade threshold a CRP for the content; degrading the CRP of the content to an IRP of the content when the access frequency of the CRP of the content is lower than a set degradation threshold.

本发明实施例提供了一种控制节点, 如图 19所示, 包括: 查 询模块 1 , 用于查找内容; 存储模块 2, 用于存储结构路由表、 结 构内容表以及根据查询模块 1 查找的内容生成的需求内容表; 路 由转发模块 3 , 用于根据存储模块 2存储的所述结构路由表、 结构 内容表以及需求内容表进行消息的路由转发。 第三探测模块 35 , 用于每隔一次计时器周期探测所述内容的 VS是否存活;任命管理 模块 36, 用于在第三探测模块 35探测到所述内容的 VS失效离开 时, 任命所述内容新的 VS , 当所述内容不存在 VS时, 任命查询 所述内容的节点成为所述内容的 VS。  The embodiment of the present invention provides a control node. As shown in FIG. 19, the method includes: a query module 1 for searching content; a storage module 2, configured to store a structure routing table, a structure content table, and content searched according to the query module 1. The generated request content table; the route forwarding module 3 is configured to perform routing and forwarding of the message according to the structure routing table, the structure content table, and the requirement content table stored by the storage module 2. a third detecting module 35, configured to detect whether the VS of the content is alive every other timer period; and an appointment management module 36, configured to: when the third detecting module 35 detects that the VS of the content fails to leave, The content new VS, when the content does not exist VS, the node that queried the content becomes the VS of the content.

由于一个节点可能同时具有不同内容的 CP、 VS、 CRP和 IRP 这些身份, 且不同内容的 CP、 VS、 CRP和 IRP的处理机制是类似 的, 所以该图将同一内容的 CP、 VS、 CRP和 IRP集中显示一个节 点上。 不影响在分布网络中, 一个节点只能为同一内容的 CP、 VS、 CRP, 或 IRP中的一种身份。  Since a node may have the same identity of CP, VS, CRP, and IRP for different contents, and the processing mechanisms of CP, VS, CRP, and IRP of different contents are similar, the figure will be CP, VS, CRP and the same content. The IRP is displayed centrally on one node. Does not affect a distributed network, a node can only be one of the CP, VS, CRP, or IRP of the same content.

本发明实施例提供了一种分布式网络管理系统, 包括: 需求内容 表生成节点,用于当所述节点分别加入分布式网络时,通过查找内容, 生成所述内容的需求内容表,并根据所述需求内容表进行消息的路由 转发; 聚类管理节点, 用于根据所述需求内容表进行所述内容的聚类 管理。 Embodiments of the present invention provide a distributed network management system, including: a table generation node, configured to: when the nodes respectively join the distributed network, generate a content list of the content by searching for content, and perform routing and forwarding of the message according to the required content table; Clustering management of the content is performed according to the demand content table.

本发明实施例具有以下有益效果:  Embodiments of the present invention have the following beneficial effects:

根据节点对内容的访问频率将节点分类, 在不同类型的节点 之间建立层次结构实现对内容的控制。 本实施例根据节点对内容 的访问频率 (又称: 需求频率) 决定了对该节点的内容更新和发 布方式: 通过主动向所有 CRP发布更新, 避免了 CRP频繁访问内 容所带来的大量询问信息;通过 IRP在使用内容前主动向 VS询问 内容的最新版本, 从而避免了向访问内容频率较低的 IRP频繁发 布更新所带来的通信量。 因此, 本发明实施例在较低的通信量下 实现了对内容及其副本的管理和控制, 保证了所有节点在对内容 进行访问时都能获得最新鲜的版本, 并保证了所有更新操作都是 在最新版本的基础上累计递增的, 而不会出现对陈旧版本的更新 操作, 此外还有效地降低了系统通信量, 并能适应动态变化环境 的需求。 节点更替过程仅会对该节点的邻居节点, 以及和特定内 容相关的特定节点, 而整个网络的大多数节点和内容都不会受到 影响。 而且由于内容存储在 VS和所有 CRP上, 且备份在 CP上, 所以即使节点突然失效, 内容也不会丟失。  The nodes are classified according to the frequency of access of the nodes to the content, and a hierarchical structure is established between different types of nodes to implement content control. In this embodiment, the content update and release mode of the node is determined according to the access frequency of the node (also referred to as the demand frequency): By actively publishing updates to all CRPs, a large amount of inquiry information brought by CRP frequent access to the content is avoided. The IRP is actively queried to the VS for the latest version of the content before using the content, thereby avoiding the traffic caused by frequent updates to the IRPs that are less frequently accessed. Therefore, the embodiment of the present invention implements management and control of content and its copy under lower traffic, ensuring that all nodes obtain the freshest version when accessing the content, and ensure that all update operations are performed. It is cumulatively added on the basis of the latest version, and there is no update operation for the old version. In addition, it effectively reduces system traffic and can adapt to the needs of dynamically changing environments. The node replacement process only affects the neighbor nodes of the node, as well as the specific nodes associated with a particular content, and most nodes and content of the entire network are not affected. And since the content is stored on the VS and all CRPs and backed up on the CP, the content is not lost even if the node suddenly fails.

本发明实施例提供的方法满足内容及其副本和路由信息可以 在网络中形成比较规则的拓朴结构; 保证内容查找的高效性; 对 内容及其副本进行有效的更新和控制, 保证内容及其副本的有效 性; 在节点发生迁移和更替以及节点对内容的需求发生变化时, 保证对拓朴结构、 内容查找的高效性、 以及内容及其副本的有效 性影响较小。  The method provided by the embodiment of the present invention satisfies the content and the copy and routing information thereof to form a topology structure with relatively strict rules in the network; ensures the efficiency of content search; effectively updates and controls the content and its copy, and ensures the content and The validity of the copy; when the node moves and replaces and the node's content needs change, it ensures less impact on the topology structure, the efficiency of content search, and the validity of the content and its copy.

本领域技术人员可以理解附图只是一个优选实施例的示意 图, 附图中的模块或流程并不一定是实施本发明所必须的。  A person skilled in the art can understand that the drawings are only schematic diagrams of a preferred embodiment, and the modules or processes in the drawings are not necessarily required to implement the invention.

本领域技术人员可以理解实施例中的装置中的模块可以按照 实施例描述分布于实施例的装置中, 也可以进行相应变化位于不 同于本实施例的一个或多个装置中。 上述实施例的模块可以合并 为一个模块, 也可以进一步拆分成多个子模块。 Those skilled in the art can understand that the modules in the device in the embodiment can follow The description of the embodiments is distributed in the apparatus of the embodiment, and the corresponding changes may also be made in one or more apparatuses different from the embodiment. The modules of the above embodiments may be combined into one module, or may be further split into multiple sub-modules.

上述本发明实施例序号仅仅为了描述, 不代表实施例的优劣。 权利要求的内容记载的方案也是本发明实施例的保护范围。 通过以上的实施方式的描述,本领域的技术人员可以清楚地了解 到本发明, 可以通过硬件实现, 也可以借助软件加必要的通用硬件平 台的方式来实现。基于这样的理解, 本发明的技术方案可以以软件产 品的形式体现出来, 该软件产品可以存储在一个非易失性存储介质 The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments. The solution described in the claims is also the scope of protection of the embodiments of the present invention. Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by hardware or by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present invention can be embodied in the form of a software product that can be stored in a non-volatile storage medium.

(可以是 CD-ROM, U盘, 移动硬盘等) 中, 包括若干指令用以使 得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等) 执行本发明各个实施例所述的方法。 (may be a CD-ROM, a USB flash drive, a removable hard drive, etc.), including a number of instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention.

总之, 以上所述仅为本发明的较佳实施例而已, 并非用于限定本 发明的保护范围。 凡在本发明的精神和原则之内所作的任何修改、 等 同替换、 改进等, 均应包含在本发明的保护范围之内。  In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Claims

权利要求 Rights request 1、 一种分布式网络的管理方法, 其特征在于, 包括: A method for managing a distributed network, comprising: 当节点加入分布式网络时, 通过查找内容, 生成所述内容的需求 内容表;  When the node joins the distributed network, by searching for content, a demand content table of the content is generated; 当节点为所述内容的虚拟服务器 VS时, 根据所述需求内容表进 行所述内容的聚类管理。  When the node is the virtual server VS of the content, cluster management of the content is performed according to the demand content table. 2、 如权利要求 1所述的方法, 其特征在于, 在所述生成所述内 容的需求内容表之后, 还包括:  2. The method according to claim 1, wherein after the generating the content table of the content, the method further comprises: 生成结构路由表和结构内容表, 并根据所述结构路由表、 所述结 构内容表和所述需求内容表进行消息的路由转发。  Generating a structure routing table and a structure content table, and performing routing and forwarding of messages according to the structure routing table, the structure content table, and the requirement content table. 3、 如权利要求 2所述的方法, 其特征在于, 所述结构路由表记 录与所述节点邻接的节点的键值和地址信息。  3. The method of claim 2, wherein the structure routing table records key value and address information of a node adjacent to the node. 4、 如权利要求 2所述的方法, 其特征在于, 所述结构内容表记 录所述节点作为所述内容的控制节点 CP的所述内容的键值、 具体信 息、 所述内容的 VS的键值和地址信息。  The method according to claim 2, wherein the structure content table records a key value, specific information, and a VS key of the content of the content as the control node CP of the content. Value and address information. 5、 如权利要求 4所述的方法, 其特征在于, 所述节点加入分布 式网络时, 如果所述节点负责的键值空间有内容, 则所述节点为所述 内容的 CP。  5. The method according to claim 4, wherein, when the node joins the distributed network, if the key space occupied by the node has content, the node is a CP of the content. 6、 如权利要求 1所述的方法, 其特征在于, 所述需求内容表记 录所述节点查找的所述内容的键值、 所述内容的具体信息、 所述内容 所在的 CP的键值和地址信息; 以及  The method according to claim 1, wherein the required content table records a key value of the content searched by the node, specific information of the content, a key value of a CP where the content is located, and Address information; 当所述节点为所述内容的 VS时, 记录所述内容的所有强一致节 点 CRP的键值和地址信息;  When the node is a VS of the content, recording key value and address information of all strong consistent nodes CRP of the content; 当所述节点为所述内容的 CRP或弱一致节点 IRP时, 记录所述 内容的 VS的键值和地址信息。  When the node is a CRP of the content or a weakly consistent node IRP, the key value and address information of the VS of the content are recorded. 7、 如权利要求 1所述的方法, 其特征在于, 所述内容的 VS根 据所述需求内容表进行所述内容的聚类管理包括:  The method according to claim 1, wherein the VS of the content performs cluster management of the content according to the required content table, including: 所述内容的 VS获取所述内容的更新信息; 所述内容的 VS根据所述需求内容表向所述内容的 CP及所述内 容的所有 CRP发布所述内容的更新信息。 The VS of the content acquires update information of the content; The VS of the content issues update information of the content to the CP of the content and all CRPs of the content according to the required content table. 8、 如权利要求 7所述的方法, 其特征在于, 在所述内容的 VS 获取所述内容的更新信息之前, 还包括:  The method according to claim 7, wherein before the VS of the content acquires the update information of the content, the method further includes: 所述内容的 IRP向所述内容的 VS发送版本验证请求, 在所述内 容的 VS验证所述内容的 IRP持有的所述内容的版本为最新版本后对 所述内容进行更新操作, 向所述内容的 VS发送更新请求;  The IRP of the content sends a version verification request to the VS of the content, and after the VS of the content verifies that the version of the content held by the IRP of the content is the latest version, the content is updated. The VS of the content sends an update request; 所述内容的 VS在接收到所述更新请求后对所述内容的更新操作 进行更新审核, 审核成功后,接受对所述内容的更新操作并修改所述 内容的版本号以获取所述内容的更新信息。  The VS of the content updates the update operation of the content after receiving the update request, and after the audit is successful, accepts an update operation on the content and modifies the version number of the content to obtain the content. Update information. 9、 如权利要求 7所述的方法, 其特征在于, 在所述内容的 VS 获取所述内容的更新信息之前, 还包括:  The method according to claim 7, wherein before the VS of the content acquires the update information of the content, the method further includes: 所述内容的 CRP对所述内容进行更新操作, 向所述内容的 VS 发送更新请求;  The CRP of the content performs an update operation on the content, and sends an update request to the VS of the content; 所述内容的 VS在接收到所述更新请求后对所述内容的更新操作 进行更新审核, 审核成功后,接受对所述内容的更新操作并修改所述 内容的版本号以获取所述内容的更新信息。  The VS of the content updates the update operation of the content after receiving the update request, and after the audit is successful, accepts an update operation on the content and modifies the version number of the content to obtain the content. Update information. 10、 如权利要求 8或 9所述的方法, 其特征在于, 还包括: 所述内容的 VS在接收到对所述内容进行更新操作的多个更新请 求时, 根据所述更新请求的时间戳进行更新审核。  The method according to claim 8 or 9, further comprising: a timestamp according to the update request when the VS of the content receives a plurality of update requests for performing an update operation on the content Perform an update review. 11、 如权利要求 1所述的方法, 其特征在于, 所述内容的 VS根 据所述需求内容表进行所述内容的聚类管理包括:  The method according to claim 1, wherein the VS of the content performs cluster management of the content according to the required content table, including: 所述内容的 VS在所述内容的 CP正常离开时, 根据所述需求内 容表将所述内容的 CP的更替消息发送给所有所述内容的 CRP;  The VS of the content, when the CP of the content normally leaves, sends a replacement message of the CP of the content to all CRPs of the content according to the requirement content table; 或者  Or 所述内容的 VS在探测到所述内容的 CP失效离开时, 将所述内 容和自身的所述内容的 VS的信息复制给所述内容的新的 CP, 根据 所述需求内容表将所述内容的 CP的更替消息发送给所有所述内容的 CRP。 The VS of the content, when detecting that the CP of the content is invalidated, copies the content and the information of the VS of the content of the content to the new CP of the content, according to the required content table. The replacement message of the CP of the content is sent to the CRP of all the content. 12、 如权利要求 1所述的方法, 其特征在于, 还包括: 12. The method of claim 1, further comprising: 所述内容的 VS在自身正常离开时, 选择所述内容的新的 VS, 将所述内容的所有 CRP信息发送给所述内容的新的 VS,并根据所述 需求内容表向所述内容的所有 CRP发送所述内容的 VS的更替消息。  The VS of the content selects a new VS of the content when it leaves normally, sends all CRP information of the content to a new VS of the content, and sends the content to the content according to the content table. All CRPs send replacement messages for the VS of the content. 13、 如权利要求 1所述的方法, 其特征在于, 还包括:  13. The method of claim 1, further comprising: 所述内容的 CP在所述内容原有的 VS失效离开后, 选择所述内 容新的 VS,并将所述内容新的 VS信息发送给报告所述内容的 VS失 效离开和查询所述内容的所述内容的 CRP和 IRP。  After the original VS of the content expires, the CP of the content selects the new VS of the content, and sends the new VS information of the content to the VS that reports the content to quit and query the content. CRP and IRP of the content. 14、 如权利要求 13所述的方法, 其特征在于, 所述选择所述内 容新的 VS包括:  14. The method according to claim 13, wherein the selecting the content of the new VS comprises: 所述内容的 CP将前来才艮告所述内容的 VS 失效的所述内容的 CRP设置为所述内容的新的 VS。  The CP of the content sets the CRP of the content that has come to the VS of the content to be invalidated as the new VS of the content. 15、 如权利要求 14 所述的方法, 其特征在于, 所述内容的 CP 将前来才艮告所述内容的 VS失效的所述内容的 CRP设置为所述内容的 新的 VS之前还包括:  15. The method according to claim 14, wherein the CP of the content further includes a CRP of the content that has been reported to the VS of the content to be invalid before the new VS of the content is further included. : 所述内容的 CRP在一个计时器周期探测不到所述内容的 VS, 向 所述内容的 CP才艮告所述内容的 VS失效离开; 或者  The CRP of the content fails to detect the VS of the content in a timer period, and the CP of the content reports that the VS of the content has expired; or 所述内容的 CRP向所述内容的 VS发送更新请求时探测到所述内 容的 VS失效离开, 向所述内容的 CP才艮告所述内容的 VS失效离开。  The CRP of the content detects that the VS of the content is invalidated when the update request is sent to the VS of the content, and the CP of the content reports that the VS of the content has expired. 16、 如权利要求 13所述的方法, 其特征在于, 所述选择所述内 容新的 VS包括:  16. The method according to claim 13, wherein the selecting the content of the new VS comprises: 所述内容的 CP在一次计时周期内没有所述内容的 CRP前来才艮告 所述内容的 VS失效时, 将前来才艮告所述内容的 VS失效的所述内容 的 CRP设置为所述内容的新的 VS。  The CP of the content sets the CRP of the content that has failed to report the VS of the content to the CRP of the content when the CRP of the content does not come to report the VS failure of the content in a timed period. The new VS of the content. 17、 如权利要求 16所述的方法, 其特征在于, 所述将前来报告 所述内容的 VS失效的所述内容的 CRP设置为所述内容的新的 VS之 前还包括:  The method according to claim 16, wherein the setting of the CRP of the content that has failed to report the content of the content to the new VS of the content further includes: 所述内容的 IRP向所述内容的 VS发送版本验证请求时探测到所 述内容原有的 VS失效离开, 向所述内容的 CP才艮告所述内容的 VS 失效离开; 或者 When the IRP of the content sends a version verification request to the VS of the content, it detects that the original VS of the content is invalidated, and the CP of the content reports the VS of the content. Expire to leave; or 所述内容的 IRP作为一个新的节点加入网络时, 所述内容的 CP 返回所述内容的 VS信息, 所述内容的 IRP根据所述内容的 VS信息 出现连接故障时, 向所述内容的 CP才艮告所述内容的 VS失效离开。  When the IRP of the content joins the network as a new node, the CP of the content returns the VS information of the content, and the IRP of the content is connected to the CP of the content according to the VS information of the content. The VS that reported the content was invalidated. 18、 如权利要求 6所述的方法, 其特征在于, 还包括:  18. The method of claim 6, further comprising: 所述内容的 VS在所述内容的 CRP正常离开或失效离开时,在所 述节点的内容需求表中删除所述正常离开或失效离开的 CRP的键值 和地址信息。  The VS of the content deletes the key value and address information of the CRP that is normally left or lapsed in the content requirement table of the node when the CRP of the content is normally left or expired. 19、 一种分布式网络的内容查询方法, 其特征在于, 包括: 原节点接收内容的查询请求, 所述查询请求携带所述内容的键 值;  A content query method for a distributed network, comprising: a query request for receiving content by an original node, wherein the query request carries a key value of the content; 当所述节点的键值管理范围不包括所述内容的键值时,所述原节 点根据需求内容表获取与所述内容的键值距离最小的节点,向与所述 内容的键值距离最小的节点转发所述查询请求。  When the key value management range of the node does not include the key value of the content, the original node acquires a node with the smallest key value from the content according to the required content table, and has a minimum distance to the key value of the content. The node forwards the query request. 20、 如权利要求 19所述的方法, 其特征在于, 在所述原节点接 收内容的查询请求后, 还包括:  The method according to claim 19, further comprising: after the original node receives the query request of the content, the method further includes: 当所述原节点的键值管理范围包括所述内容的键值时,所述原节 点为所述查询内容的 CP, 当所述内容不存在 VS时, 所述原节点成 为所述内容的 VS, 并与所述内容的 CP建立双向连接; 当所述内容 存在 VS时, 所述原节点成为所述内容的弱一致节点 IRP, 并与所述 内容的 VS建立连接。  When the key management range of the original node includes the key value of the content, the original node is the CP of the query content, and when the content does not exist, the original node becomes the VS of the content. And establishing a two-way connection with the CP of the content; when the content exists in the VS, the original node becomes a weak consistent node IRP of the content, and establishes a connection with the VS of the content. 21、 如权利要求 20所述的方法, 其特征在于, 在所述原节点成 为所述内容的 VS, 并与所述内容的 CP建立双向连接之后, 还包括: 所述 VS和所述 CP保持周期性的存活探测。  The method according to claim 20, wherein after the original node becomes the VS of the content and establishes a bidirectional connection with the CP of the content, the method further includes: the VS and the CP remain Periodic survival detection. 22、 如权利要求 20所述的方法, 其特征在于, 在所述原节点成 为所述内容的 IRP之后, 还包括:  The method according to claim 20, further comprising: after the original node becomes an IRP of the content, 当所述内容的 IRP的访问频率高于所述内容的 VS设定的升级临 界值时, 所述内容的 VS将所述内容的 IRP升级为所述内容的 CRP。  When the access frequency of the IRP of the content is higher than the upgrade threshold of the VS setting of the content, the VS of the content upgrades the IRP of the content to the CRP of the content. 23、 如权利要求 22所述的方法, 其特征在于, 还包括: 所述内容的 VS在所述内容的 CRP的访问频率低于设定的降级临 界值时, 将所述内容的 CRP降级为所述内容的 IRP。 The method of claim 22, further comprising: The VS of the content degrades the CRP of the content to an IRP of the content when the access frequency of the CRP of the content is lower than a set degraded threshold. 24、 一种分布式网络管理系统, 其特征在于, 包括:  24. A distributed network management system, comprising: 需求内容表生成节点, 用于当所述节点分别加入分布式网络时, 通过查找内容, 生成所述内容的需求内容表, 并根据所述需求内容表 进行消息的路由转发;  a requirement content table generating node, configured to: when the nodes respectively join the distributed network, generate a content list of the content by searching for content, and perform routing and forwarding of the message according to the demand content table; 聚类管理节点,用于根据所述需求内容表进行所述内容的聚类管 理。  And a cluster management node, configured to perform cluster management of the content according to the demand content table. 25、 一种分布式网络管理系统, 其特征在于, 包括:  25. A distributed network management system, comprising: 虚拟服务器, 用于根据需求内容表进行所述内容的聚类管理; 强一致节点, 用于对所述内容进行内容更新操作, 向所述内容的 虚拟服务器 VS发送更新请求;  a virtual server, configured to perform clustering management of the content according to the required content table; a strong consistent node, configured to perform a content update operation on the content, and send an update request to the virtual server VS of the content; 弱一致节点, 用于发送版本验证请求, 在所述版本为所述内容的 最新版本时, 进行内容更新操作, 向所述内容的 VS发送更新请求; 控制节点, 用于在探测到所述内容的 VS失效离开时, 任命所述 内容新的 VS, 当所述内容不存在 VS时, 任命查询所述内容的节点 成为所述内容的 VS。  a weakly consistent node, configured to send a version verification request, when the version is the latest version of the content, perform a content update operation, and send an update request to the VS of the content; and the control node is configured to detect the content When the VS fails to leave, the content new VS is appointed, and when the content does not exist in the VS, the node that queried the content becomes the VS of the content. 26、 一种弱一致节点, 其特征在于, 包括:  26. A weakly consistent node, characterized by comprising: 查询模块, 用于查找内容;  a query module for finding content; 路由转发模块, 用于根据存储的需求内容表进行消息的路由转 发;  a route forwarding module, configured to perform route routing of the message according to the stored content table of requirements; 第一更新操作模块, 用于发送版本验证请求, 在所述版本为所述 内容的最新版本时, 进行内容更新操作, 向所述内容的 VS发送更新 请求。  The first update operation module is configured to send a version verification request, and when the version is the latest version of the content, perform a content update operation, and send an update request to the VS of the content. 27、 如权利要求 26所述弱一致节点, 其特征在于, 还包括: 存储模块, 用于存储根据所述查找内容生成的需求内容表。 The weakly consistent node according to claim 26, further comprising: a storage module, configured to store a required content table generated according to the searched content. 28、 一种强一致节点, 其特征在于, 包括: 28. A strong consistent node, characterized by comprising: 查询模块, 用于查找内容;  a query module for finding content; 路由转发模块, 用于根据存储的需求内容表进行消息的路由转 发; a route forwarding module, configured to perform routing routing of messages according to the stored content table of requirements hair; 第二更新操作模块, 用于对所述内容进行内容更新操作, 向所述 内容的 VS发送更新请求。  And a second update operation module, configured to perform a content update operation on the content, and send an update request to the VS of the content. 29、 如权利要求 28所述的强一致节点, 其特征在于, 还包括: 第一探测模块, 用于每隔一次计时器周期探测所述内容的 VS是 否存活;  The strong consistent node according to claim 28, further comprising: a first detecting module, configured to detect whether the VS of the content is alive every other timer period; 第一报告模块, 用于在所述第一探测模块探测到所述内容的 VS 失效离开时, 向所述内容的 CP才艮告所述内容的 VS失效离开。  The first reporting module is configured to notify the CP of the content that the VS of the content is invalidated when the first detecting module detects that the VS of the content is detached. 30、 一种虚拟服务器, 其特征在于, 包括:  30. A virtual server, comprising: 查询模块, 用于查找内容;  a query module for finding content; 路由转发模块, 用于根据存储的需求内容表进行消息的路由转 发;  a route forwarding module, configured to perform route routing of the message according to the stored content table of requirements; 聚类管理模块, 用于在接受对所述内容的更新请求, 所述内容的 CP或所述内容的 CRP失效离开时,根据存储的所述需求内容表进行 所述内容的聚类管理。  And a clustering management module, configured to perform clustering management of the content according to the stored requirement content table when accepting an update request for the content, where the CP of the content or the CRP of the content fails to leave. 31、 如权利要求 30所述虚拟服务器, 其特征在于, 还包括: 版本验证模块,用于在接收到所述内容的 IRP发送的版本验证请 求时验证所述内容的 IRP版本是否是所述内容的最新版本;  The virtual server according to claim 30, further comprising: a version verification module, configured to verify whether an IRP version of the content is the content when receiving a version verification request sent by an IRP of the content The latest version; 更新审核模块, 用于在接收到所述内容的更新请求后, 判断所述 内容的版本号是否是最新的版本号, 如果是, 则接受对所述内容的更 新操作并修改所述内容的版本号;在接收到对所述内容进行内容更新 操作的多个更新请求时, 根据所述更新请求的时间戳进行更新审核; 第二探测模块, 用于每隔一次计时器周期探测所述内容的 CP和 所述内容的 CRP是否存活;  An update review module, configured to: after receiving the update request of the content, determine whether the version number of the content is the latest version number, and if yes, accept an update operation on the content and modify the version of the content When the plurality of update requests for performing the content update operation on the content are received, the update audit is performed according to the timestamp of the update request; the second detecting module is configured to detect the content every other timer period. Whether the CP and the CRP of the content are alive; 级别管理模块,用于在所述内容的 IRP的访问频率高于设定的升 级临界值时将所述内容的 IRP升级为所述内容的 CRP; 在所述内容 的 CRP的访问频率低于设定的降级临界值时将所述内容的 CRP降级 为所述内容的 IRP。 a level management module, configured to upgrade an IRP of the content to a CRP of the content when an access frequency of the IRP of the content is higher than a set upgrade threshold; and a CRP access frequency of the content is lower than a setting The CRP of the content is degraded to the IRP of the content when the degraded threshold is determined. 32、 一种控制节点, 其特征在于, 包括: 32. A control node, comprising: 查询模块, 用于查找内容;  a query module for finding content; 路由转发模块, 用于根据存储的需求内容表进行消息的路由转 发;  a route forwarding module, configured to perform route routing of the message according to the stored content table of requirements; 第三探测模块, 用于每隔一次计时器周期探测所述内容的 VS是 否存活;  a third detecting module, configured to detect whether the VS of the content is alive every other timer period; 任命管理模块, 用于在所述第三探测模块探测到所述内容的 VS 失效离开时, 任命所述内容新的 VS, 当所述内容不存在 VS时, 任 命查询所述内容的节点成为所述内容的 vs。  An appointment management module, configured to appoint the content new VS when the third detection module detects that the VS of the content is detached, and when the content does not exist VS, appoint a node that queries the content to become The content of the vs.
PCT/CN2009/071636 2008-05-30 2009-05-05 Management method, content querying method, system and apparatus of distributed network Ceased WO2009143738A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2008101107829A CN101594316B (en) 2008-05-30 2008-05-30 Management method, content query method, system and device of distributed network
CN200810110782.9 2008-05-30

Publications (1)

Publication Number Publication Date
WO2009143738A1 true WO2009143738A1 (en) 2009-12-03

Family

ID=41376595

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/071636 Ceased WO2009143738A1 (en) 2008-05-30 2009-05-05 Management method, content querying method, system and apparatus of distributed network

Country Status (2)

Country Link
CN (1) CN101594316B (en)
WO (1) WO2009143738A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729387A (en) * 2008-10-24 2010-06-09 华为技术有限公司 System, device and method for bidirectional clustering of content nodes
CN101902458B (en) * 2010-02-21 2013-04-24 中国联合网络通信集团有限公司 Interprocess communication method across host machine, device thereof and system thereof
CN103107944B (en) * 2011-11-14 2016-03-30 中国移动通信集团公司 A kind of content positioning method and routing device
CN103139226B (en) * 2011-11-23 2015-10-07 中国科学院声学研究所 A kind of copy storage system based on the polymerization of P2P online information and method
CN103885964B (en) * 2012-12-20 2017-06-27 北京新媒传信科技有限公司 A kind of content auditing method and system
CN106165355A (en) * 2014-01-31 2016-11-23 交互数字专利控股公司 For the methods, devices and systems by realizing network association based on the peerings of hash route and/or summary route
CN105138528B (en) * 2014-06-09 2020-03-17 腾讯科技(深圳)有限公司 Method and device for storing and reading multi-value data and access system thereof
CN107623606B (en) * 2016-07-15 2019-12-17 中国科学院声学研究所 Flow table entry idle timeout detection method based on openflow switch
CN112541147A (en) * 2019-09-23 2021-03-23 北京轻享科技有限公司 Content publishing management method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060190607A1 (en) * 2001-01-12 2006-08-24 Lowery Keith A Method and System for Community Data Caching
CN1859105A (en) * 2005-10-25 2006-11-08 华为技术有限公司 Method for sharing digital content in point-to-point network
CN101072160A (en) * 2007-06-14 2007-11-14 华为技术有限公司 Distributed virtual environment management method, system and node
CN101106503A (en) * 2007-08-31 2008-01-16 华为技术有限公司 Method, node device and system for peer-to-peer network autonomy
CN101355591A (en) * 2008-09-12 2009-01-28 中兴通讯股份有限公司 P2P network and scheduling method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060190607A1 (en) * 2001-01-12 2006-08-24 Lowery Keith A Method and System for Community Data Caching
CN1859105A (en) * 2005-10-25 2006-11-08 华为技术有限公司 Method for sharing digital content in point-to-point network
CN101072160A (en) * 2007-06-14 2007-11-14 华为技术有限公司 Distributed virtual environment management method, system and node
CN101106503A (en) * 2007-08-31 2008-01-16 华为技术有限公司 Method, node device and system for peer-to-peer network autonomy
CN101355591A (en) * 2008-09-12 2009-01-28 中兴通讯股份有限公司 P2P network and scheduling method thereof

Also Published As

Publication number Publication date
CN101594316B (en) 2012-06-06
CN101594316A (en) 2009-12-02

Similar Documents

Publication Publication Date Title
WO2009143738A1 (en) Management method, content querying method, system and apparatus of distributed network
JP6382454B2 (en) Distributed storage and replication system and method
US9684453B2 (en) Cluster federation and trust in a cloud environment
US9231988B2 (en) Intercluster repository synchronizer and method of synchronizing objects using a synchronization indicator and shared metadata
CN118426713B (en) Cluster file distributed management method and system
CN100588172C (en) A system and method for realizing network reservation storage
JP4938074B2 (en) Resource location information request method, user node and server for the method
JP4658412B2 (en) Data sharing device
US7440977B2 (en) Recovery method using extendible hashing-based cluster logs in shared-nothing spatial database cluster
CN113268472B (en) Distributed data storage system and method
EP2227016A1 (en) A content buffering, querying method and point-to-point media transmitting system
CN111046065B (en) Scalable high-performance distributed query processing method and device
CN110866046B (en) A scalable distributed query method and device
CN104769919A (en) Load Balancing Access to Replicated Databases
WO2010127618A1 (en) System and method for implementing streaming media content service
CN111787055A (en) A Redis-based, transaction-oriented and multi-data center data distribution method and system
KR20130137897A (en) Method for managing data in asymmetric cluster file system
El Dick et al. Flower-CDN: a hybrid P2P overlay for efficient query processing in CDN
US7529196B2 (en) Routing a service query in an overlay network
CN113489784A (en) Distributed storage asymmetric logic unit access multipath implementation method and system
CN110990448B (en) A fault-tolerant distributed query method and device
JP7618023B2 (en) Active-active storage system and data processing method thereof
US20140222988A1 (en) Method for adaptive content discovery for distributed shared caching system
Matri et al. Keeping up with storage: Decentralized, write-enabled dynamic geo-replication
Yu et al. Granary: A sharing oriented distributed storage system

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

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

Country of ref document: EP

Kind code of ref document: A1