WO2012136094A1 - Method and system for controlling overload in peer-to-peer network - Google Patents

Method and system for controlling overload in peer-to-peer network Download PDF

Info

Publication number
WO2012136094A1
WO2012136094A1 PCT/CN2012/072273 CN2012072273W WO2012136094A1 WO 2012136094 A1 WO2012136094 A1 WO 2012136094A1 CN 2012072273 W CN2012072273 W CN 2012072273W WO 2012136094 A1 WO2012136094 A1 WO 2012136094A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
message
data
receiving
backup
Prior art date
Application number
PCT/CN2012/072273
Other languages
French (fr)
Chinese (zh)
Inventor
陶全军
吴建华
郝振武
胡永生
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2012136094A1 publication Critical patent/WO2012136094A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/563Data redirection of data network streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1048Departure or maintenance mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/40Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass for recovering from a failure of a protocol instance or entity, e.g. service redundancy protocols, protocol state redundancy or protocol service redirection

Definitions

  • the present invention relates to peer-to-peer (P2P, Peer-to-Peer) network technology, and more particularly to a method and system for controlling overload in a P2P network.
  • P2P peer-to-peer
  • Peer-to-Peer Peer-to-Peer
  • P2P network technology has fully demonstrated strong technical advantages in file exchange, distributed computing, and service sharing.
  • the application of P2P network technology is mainly concentrated in the application of the Internet, but has not been applied on a large scale in the traditional telecommunication network.
  • SIP Session Initiation Protocol
  • the network technology is introduced into the telecommunication network, it is required to ensure the application of SIP in the P2P network. It also requires the ability to run a variety of typical businesses.
  • Figure 1 shows a P2P core network that most researchers and research institutions agree with in existing research.
  • the P2P core network includes: a P2P overlay network 101, a P2P node 102, a non-P2P terminal 103, and a P2P terminal 104.
  • the P2P overlay network 101 is a logical network composed of P2P nodes 102 of different roles; the P2P node 102 is a basic component of the P2P overlay network 101, and is capable of providing storage and transmission to other nodes in the P2P overlay network 101.
  • the node of the service; the non-P2P terminal 103 is a terminal device that does not support any P2P protocol and only supports SIP in the P2P overlay network 101; the P2P terminal 104 supports both the P2P protocol and the P2P overlay network 101.
  • the SIP-enabled terminal device is weak in the terminal device, especially the handheld terminal device. Therefore, in actual deployment, the P2P terminal 104 is only used as a P2P client to access the P2P overlay network 101, and does not assume storage.
  • Server functions such as transmission, and, taking into account the needs of telecommunications operations, Both the P2P terminal 104 and the non-P2P terminal 103 are required to access the P2P overlay network 101 through the nearest P2P node 102.
  • the P2P node 102 When the P2P node 102 simultaneously serves as the access node of the non-P2P terminal 103 and the P2P terminal 104, for non-P2P
  • the terminal 103 the P2P node 102 is responsible for converting the SIP adopted by the non-P2P terminal 103 and the protocol used for routing the SIP inside the P2P overlay network 101, and then relaying the message.
  • the P2P node 102 only needs to message. Relay.
  • the P2P nodes 102 implement dynamic real-time backup of data between nodes according to a Distributed Hash Table (DHT) algorithm.
  • DHT Distributed Hash Table
  • FIG. 2 is a schematic flowchart of a conventional network overload control method. As shown in FIG. 2, the process includes the following steps:
  • Step 201 The forward node senses that the backward node is overloaded.
  • the forward node senses that the backward node is overloaded by: the backward node or the overload server notifies the forward node that the backward node is overloaded, or the forward node Inferring that the backward node is overloaded according to the message delay;
  • Step 202 The forward node discards or sends a message to the backward node according to the predetermined ratio according to the overload policy and the backward node overload, so as to reduce the load of the backward node.
  • the node when the node is aware of the backward node overload, it will discard or send the message to the backward node according to the established ratio.
  • the telecommunications that introduces the P2P network technology are controlled.
  • the overload in the network can not reflect the advantages of P2P network technology, but will increase the instability of P2P network.
  • the advantages of P2P network are: exchange quality for quantity, but single node in P2P network
  • the stability is less stable than the single node in the traditional telecommunication network. Therefore, when the network is under heavy load, the nodes in the P2P network are more likely to form resource overload.
  • the traditional overload control method is used, When the load is high, the connection rate of the telecommunication network that introduces the P2P network technology is far lower than that of the traditional telecommunication network, thus greatly reducing the user experience. Summary of the invention
  • the main object of the present invention is to provide a method and system for controlling overload in a P2P network, which can ensure continuity of telecommunication services and thereby improve user experience.
  • the present invention provides a method for controlling overload in a P2P network, the method comprising: after a node receiving a message is overloaded, the backup node of the node receiving the message receives a message sent by a node that sends the message.
  • the method further includes:
  • the node that sends the message After the node that sends the message senses that the node that receives the message is overloaded, it sends a message directly to the backup node of the node that receives the message; or
  • the message sent by the node that sends the message is forwarded to the backup node.
  • the method further includes:
  • the backup node After receiving the message, the backup node proxies the node receiving the message to process the service, and after the processing is completed, returns a service request response message to the node that sends the message.
  • the method before the proxying the node receiving the message to process the service, the method further includes:
  • the backup node sends a proxy solicitation request message to the node that receives the message, and after receiving the proxy solicitation request message response message, proxying the node receiving the message to process the service;
  • the backup node sends a proxy solicitation request message to the node that receives the message; after the timer expires, and the message returned by the node receiving the message is not received, the backup node sets the user data to be proxied. Synchronizing the identity, and then proxying the node receiving the message to process the service.
  • One step includes:
  • the node receiving the message After the node receiving the message receives the agent solicitation request message, and allows the backup node agent to process the service, the node receiving the message sets an incompleteness identifier for the user data to be proxied by the backup node, and then The backup node returns a reply message.
  • the incompleteness identifier includes the address information of the backup node; after the incompleteness identifier is set for the user data to be proxied by the backup node, the method further includes:
  • the node receiving the message synchronizes the incompleteness identifier to all backup nodes of the node receiving the message.
  • the method further includes:
  • the node receiving the message performs data synchronization with the backup node.
  • the backup node synchronizes the change data generated when the node receiving the message processes the service to the node receiving the message.
  • the method further includes:
  • the node that sends the message discards or sends the message proportionally according to the overload policy.
  • the method further includes:
  • the node that receives the message is overloaded, and the node that receives the message or the other backup node of the node that receives the message receives the message sent by the node that sends the message again, and then forwards the message to the corresponding user.
  • the address marked in the data area is marked in the data area.
  • the present invention also provides a method for data migration in a P2P network node overload process, Methods include:
  • the new joining node sends a join request message to the responsible node
  • the responsible node migrates the data that the newly added node is responsible for to the newly joined node; after the new joining node receives the migration data, and determines that the data of some users in the received migration data is incomplete, the The backup node responsible for the node acquires data of the part of the user.
  • the determining that the data of the part of the user in the migrated data is incomplete is:
  • the newly joining node determines that the data of the user is incomplete according to the incompleteness identifier in the data of the user.
  • the incompleteness identifier includes the address information of the backup node; the acquiring, by the backup node of the responsible node, the data of the part of the user, where: the new joining node is according to the backup node Address information, obtaining data of the part of the user from the backup node.
  • the data of the part of the user includes the change data generated when the backup node agent.
  • the present invention also provides a system for controlling overload in a peer-to-peer network, the system comprising: a first node, which is a backup node of a node that receives a message, and a node that receives a message is overloaded, and sends a node that sends a message to send Message.
  • the first node is further configured to: after receiving the message sent by the second node, the node that receives the message processing the service, and after the processing is completed, return a service request response message to the second node;
  • the system further includes: a second node, configured to receive a service request response message returned by the second node.
  • the system further includes: a third node, configured to: after receiving the agent solicitation request message sent by the first node, set an incompleteness identifier for the data to be proxied by the first node, Returning a response message to the first node;
  • the first node is further configured to send a proxy solicitation request message to the third node, and after receiving the response message returned by the third node, proxy the third node to process the service; or
  • the first node is further configured to send a proxy solicitation request message to the third node, and after the timer expires, and the message returned by the third node is not received, The data settings are not synchronized, and the third node is acting on the business.
  • the third node after being used for overloading, forwards the received message sent by the second node to the first node;
  • the second node is further configured to send a message to the third node;
  • the second node is further configured to: after sensing that the third node is overloaded, directly send a message to the first node.
  • the third node is further configured to perform data synchronization with the first node after the overload state is canceled;
  • the first node is further configured to perform data synchronization with the third node after the third node is overloaded.
  • the first node is further configured to: after receiving the message sent by the second node, and notify all the backup nodes of the third node that the load is overloaded, notify the second node;
  • the second node is further configured to: after receiving the notification of the first node, discard or send the message according to the overload policy.
  • the present invention also provides a system for data migration during a P2P network node overload process, the system comprising: a fourth node, a fifth node, and a sixth node;
  • the fourth node when used to join the peer-to-peer network, sends a join request message to the fifth node, and after receiving the migrated data migrated by the fifth node, and determining that the data of some users in the received migration data is incomplete, Obtaining data of the part of the user from the sixth node;
  • the fifth node is further configured to: after receiving the join request message sent by the fourth node, migrate the data that the fourth node should be responsible to to the fourth node;
  • the sixth node is configured to provide data of the part of the user to the fourth node.
  • the data of the part of the user includes the change data generated when the sixth node agent.
  • the method and system for controlling overload in a P2P network provided by the present invention, after the node receiving the message is overloaded, the backup node of the node receiving the message receives the message sent by the node sending the message, when the node receiving the message is overloaded, The node receiving the message by the backup node agent of the node receiving the message processes the service, so that when the node of the telecommunication network introducing the P2P network technology is under heavy load, the service connection rate is effectively improved, thereby ensuring the continuity of the telecommunication service, and further Improve user physical insurance.
  • the newly joining node sends a join request message to the responsible node; the responsible node migrates data to be newly added by the newly added node to the newly joined node; After the new joining node receives the migration data, and determines that the data of some users in the received migration data is incomplete, the data of the part of the user is obtained from the backup node of the responsible node, so that the P2P network technology can be introduced.
  • the nodes of the telecommunication network are under heavy load, the integrity of the migrated data is ensured, thereby ensuring the normal operation of the network and improving the user experience.
  • FIG. 1 is a schematic diagram of a telecommunication network architecture of an existing P2P network technology
  • FIG. 2 is a schematic flow chart of a conventional network overload control method
  • FIG. 3 is a schematic flowchart of a method for controlling an overload in a P2P network according to the present invention
  • FIG. 4 is a schematic flowchart of a method for controlling an overload in a P2P network according to Embodiment 1;
  • FIG. 5 is a schematic flowchart of a method for controlling an overload in a P2P network according to Embodiment 2;
  • FIG. 6 is a schematic flowchart of a method for controlling an overload in a P2P network in Embodiment 3; 7 is a schematic flowchart of a method for controlling an overload in a P2P network in Embodiment 4;
  • Embodiment 8 is a schematic flowchart of a method for implementing data migration in Embodiment 5;
  • FIG. 9 is a schematic structural diagram of a system for controlling overload in a P2P network according to the present invention. detailed description
  • the basic idea of the present invention is: After the node receiving the message is overloaded, the backup node of the node receiving the message receives the message sent by the node transmitting the message.
  • the method for controlling the overload in the P2P network of the present invention includes the following steps: Step 301: After the node receiving the message is overloaded, the backup node of the node that receives the message receives the message sent by the node that sends the message;
  • the method may further include:
  • the node that sends the message directly sends the message to the backup node after the node that receives the message is overloaded by the prior art;
  • the message sent by the node that sent the message is forwarded to the backup node.
  • Step 302 After receiving the message, the backup node processes the service of the node receiving the message, and after the processing is completed, returns a service request response message to the node that sends the message; the backup node receives the message and Before the agent receiving the message processes the service, the method may further include:
  • the backup node sends a proxy solicitation request message to the node that receives the message; after receiving the request message, the node receiving the message sets an incompleteness identifier for the user data to be proxied by the backup node, and then goes to the backup.
  • the node returns a reply message;
  • the backup node After receiving the response message, the backup node proxyes the node that receives the message to process the service; or The backup node sends a proxy solicitation request message to the node that receives the message; after the timer expires, and the message returned by the node receiving the message is not received, the backup node sets the user data to be proxied. Synchronizing (Non-SYN) identification, and then proxying the node receiving the message to process the service;
  • the incompleteness identifier is used to identify that the data of the user is incomplete.
  • the incompleteness identifier may further include address information of the backup node, for example, a node (Node) identifier (ID) of the backup node.
  • the IDentity of the information after setting the incompleteness identifier for the user data to be proxied by the backup node, the method may further include: the node receiving the message synchronizing the incompleteness identifier to the received message All backup nodes of the node; then if the message received by the node receiving the message or the other backup node of the node receiving the message is the service of the user of the backup node agent, then forwarding the message to the Describe the address marked in the user data area, that is, the address of the backup node;
  • the non-integrity identifier may be a semi-active identifier; the Semi-Active identifier is used to identify that the user's service has been processed by the backup node proxy; and the Non-SYN identifier is used to indicate that the user's data is not Synchronize;
  • the backup node When the timer expires and the message of the node receiving the message is not received, the backup node considers that the node receiving the message is in a full load state.
  • the present invention also provides a method for data migration in a P2P network node overload process, the method comprising:
  • the new joining node sends a join request message to the responsible node
  • the responsible node migrates the data that the newly added node should be responsible for to the newly joined node.
  • the newly added node After the newly added node receives the migration data, and determines that the data of the part of the received migration data is incomplete, the data of the part of the user is obtained from the backup node of the responsible node;
  • the responsible node is overloaded, and the data that the newly added node should be responsible for is migrated to the new one.
  • the specific processing of the ingress node can adopt the existing processing procedure;
  • Non-Trust non-trusted identifier
  • the newly joined node determines that some of the users in the received migration data are incomplete;
  • the Non-Trust identifier is used to identify that the data is untrustworthy.
  • the node receiving the message cancels its full load state, it sets a Non-Trust identifier for all data maintained by itself.
  • the incompleteness identifier may further include address information of the backup node, such as: node ID information of the backup node; the new joining node acquires the location from the backup node according to the address information of the backup node.
  • address information of the backup node such as: node ID information of the backup node; the new joining node acquires the location from the backup node according to the address information of the backup node.
  • the data of the part of the user includes the change data generated when the backup node agent.
  • the data is synchronized with the backup node. Specifically, the backup node synchronizes the change data generated when the node that receives the message processes the service to the received message. Node.
  • backup node when the backup node receives the message, and all the backup nodes of the node that senses the received message are overloaded, notify the node that sends the message; after the node that sends the message receives the notification, according to the overload policy, Discard or send messages proportionally.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • the application scenario of this embodiment is as follows: Node 1 is a node that sends a message, Node 2 is a node that receives a message, and is overloaded, and node 3 is a backup node of node 2.
  • the overload refers to the load of node 2 is reached.
  • the method for controlling the overload in the P2P network in this embodiment includes the following steps:
  • Step 401 After the node 1 senses that the node 2 is overloaded, the node 1 selects to send a service request message to the node 3 according to the overload policy;
  • the node 1 can be aware that the node 2 is overloaded by the prior art; the node 1 can obtain the node 3 through the DHT algorithm, and then send a service request message to the node 3 according to the data;
  • the overload strategy may be set according to requirements, and the overload strategy may include: an overloaded valve value, a full-load valve value, etc.; for example: a valve value that can be set to an overload is 90%, and a full-load valve value is 96%, etc.;
  • the service request message includes: a user identity or a resource ID;
  • the node 1 does not sense that the node 2 is overloaded. After the node 1 sends a service request message to the node, the node 2 forwards the service request message to the node 3 due to overload.
  • Step 402 After receiving the service request message, the node 3 sends a proxy solicitation request to the node 2, where the proxy solicitation request message includes: a user identity identifier or a resource ID.
  • Step 403 Node 2 receives the agent solicitation request message, if the node 3 is allowed to proxy the service, step 404 is performed, otherwise, step 407 is performed;
  • the node 2 determines whether to allow the node 3 to proxy the service according to the need. For example, after the node 2 is overloaded, another backup node of the node 2 proxies the service of a certain user, and the service request received by the node 3 When the information is still the service of the user, node 2 may not allow node 3 to proxy the service, and still another node of node 2 proxy the service of the user.
  • Step 404 The node 2 sets a Semi-Active identifier in the data area corresponding to the user identity or the resource ID, and then returns a response message to the node 3;
  • the Semi-Active identifier may include: address information of the node 3, such as: Node (Node) identification ID information of the node 3; the Semi-Active identifier is used to identify that the service of the user has been processed by the backup node agent;
  • Node 2 can synchronize the set Semi-Active ID to all of its own backup nodes.
  • Step 405 After receiving the response message, the node 3 processes the service instead of the node 2, and returns a service request response message to the node 1 after the processing is completed, and then proceeds to step 406;
  • the proxy node 2 processes the service, or
  • the node 3 can directly process the service by the proxy node 2 according to the protocol with the node 2; if the service request sent by the node 1 only involves the read operation service, the node 3 can not request the consent of the node 2, that is, the step is not executed. 402 ⁇ 404, the direct proxy node 2 processes the service; wherein the protocol can be set according to requirements.
  • Step 406 After the node 2 overload state is canceled, the node 3 performs data synchronization with the node 2, and the node 3 synchronizes the change data generated when the proxy node 2 processes the service to the node 2, and ends the current processing flow;
  • the node 3 may be notified, and after receiving the notification, the node 3 performs data synchronization with the node 2; or, after the node 2 cancels the overload state, it determines whether the Semi-Active identifier exists.
  • User data if present, acquires data from the node 3, thereby implementing data synchronization; or, the node 2 can directly acquire data from the node 3 according to the address information of the node 3 in the Semi-Active identifier, thereby implementing data synchronization; or
  • the node 3 periodically queries the overload state of the node 2, and finds that the node 2 synchronizes the data to the node 2 after the overload state is canceled.
  • the node 3 can query whether the overload state of the node 2 is canceled by periodically sending a message to the node 2.
  • the overload server may be periodically queried whether the overload status of the node 2 is canceled.
  • Step 407 Node 2 returns a reject message to node 3.
  • Step 408 After receiving the reject message, the node 3 returns a reject message to the node 1, and then ends the current processing flow.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • the application scenario of this embodiment is: Node 1 is a node that sends a message, Node 2 is a node that receives a message, and is fully loaded, and node 3 is a backup node of node 2.
  • the full load means that the load of node 2 is reached.
  • the preset threshold value of the valve, the method for controlling the overload in the P2P network in this embodiment, as shown in FIG. 5, includes the following steps:
  • Step 501 After node 1 senses that node 2 is fully loaded, node 1 selects according to the overload policy. Sending a service request message to the node 3;
  • the node 1 can be aware that the node 2 is overloaded by the prior art; the node 1 can obtain the node 3 through the DHT algorithm, and then send a service request message to the node 3 according to the data;
  • the overload strategy may be set according to requirements, and the overload strategy may include: an overloaded valve value, a full-load valve value, etc.; for example: a valve value that can be set to be overloaded is 90%, and a full-load valve value is 96%, etc.;
  • the service request message includes: a user identity or a resource ID;
  • the node 1 does not perceive that the node 2 is fully loaded.
  • the node 2 forwards the service request message to the node 3 due to overload.
  • Step 502 After receiving the service request message, the node 3 sends a proxy solicitation request message to the node 2, and starts a timer.
  • the proxy solicitation request message includes: a user identity identifier or a resource ID;
  • the duration of the timer is set according to requirements, such as: Is, etc.
  • Step 503 After the timer expires and the response message of the node 2 is not received, the Non-SYN identifier is set in the data area corresponding to the user identity representation or the resource ID, and then the proxy node 2 processes the service, and after the processing is completed, The node 1 returns a service request response message, and then performs step 504.
  • the node 3 may repeatedly send an acknowledgement message to the node 2 multiple times, if the node is still not received. 2, the confirmation message, the proxy node 2 processes the service; wherein, the number of times the confirmation message is sent can be set according to needs, for example: 3 times;
  • node 3 When the timer expires and the response message of node 2 is not received, node 3 considers node 2 to be in a full load state;
  • the Non-SYN identifier is used to indicate that the data of the user is not synchronized; the Non-SYN identifier may include address information of the node 3, for example: Node ID information of the node 3;
  • step 502 is performed, and After setting the Non-SYN identifier in the data area corresponding to the user identity representation or the resource ID, the proxy node 2 processes the service, or the node 3 can directly process the node 2 according to the protocol with the node 2;
  • the service request sent by the node 1 only involves the read operation service, and the node 3 may not send the agent solicitation request message to the node 2, and the direct proxy node 2 processes the service; wherein the protocol may be set as needed.
  • Step 504 After the node 2 full load state is canceled, the node 3 performs data synchronization with the node 2, synchronizes the change data generated when the proxy node 2 processes the service to the node 2, and ends the current processing flow; where, when the node 2 is fully loaded After canceling, all the data that it maintains is considered untrustworthy. You can set the Non-Tmst identifier for all the data it maintains, and then obtain the change data from the node 3 to achieve data synchronization.
  • the The node 3 queries the data status message, and after receiving the query data status message, the node 3 sends all the user data lists with the Non-SYN identifier to the node 2, and after receiving the list, the node 2 is in the user data list.
  • the user data area is set to the Semi-Active identity, and then the node 3 is notified that the full load state is canceled.
  • the node 3 After receiving the notification, the node 3 performs data synchronization with the node 2; wherein, the Semi-Active identifier is used to identify that the user's service has been represented by the backup node. deal with.
  • Embodiment 3 is a diagrammatic representation of Embodiment 3
  • node 1 is a node that sends a message
  • node 2 is a node that receives a message, and is overloaded
  • node 3 and node 4 are backup nodes of node 2
  • node 3 is also overloaded, here
  • the method of controlling the overload in the P2P network in this embodiment, as shown in FIG. 6, includes the following steps:
  • Step 601 After the node 1 senses that the node 2 is overloaded, the node 1 selects to send a service request message to the node 3 according to the overload policy;
  • the node 1 can be aware that the node 2 is overloaded by the prior art; the node 1 can obtain the node 3 through the DHT algorithm, and then send a service request message to the node 3 according to the data;
  • the overload strategy may be set according to requirements, and the overload strategy may include: an overloaded valve value, a full-load valve value, etc.; for example: a valve value that can be set to be overloaded is 90%, and a full-load valve value is 96%, etc.;
  • the service request message includes: a user identity or a resource ID;
  • the node 1 does not sense that the node 2 is overloaded. After the node 1 sends a service request message to the node, the node 2 forwards the service request message to the node 3 due to overload.
  • Step 602 After receiving the service request message, the node 3 finds that it is overloaded, and forwards the received service request message to the node 4;
  • the node 3 can obtain the node 4 through the DHT algorithm, and then forward the service request message to the node 4 according to this;
  • the service request message includes: a user identity or a resource ID.
  • Step 603 After receiving the service request message, the node 4 sends a proxy solicitation request to the node 2, where the node 4 can also send a proxy solicitation request message to the node 3, and after receiving the message, the node 3 forwards the message to the node 2;
  • the agent solicitation request message includes: a user identity or a resource ID.
  • Step 604 Node 2 receives the proxy solicitation request message, if the node 4 is allowed to proxy the service, step 605 is performed, otherwise, step 608 is performed;
  • the node 2 determines whether to allow the node 4 to proxy the service according to the need. For example, after the node 2 is overloaded, another backup node of the node 2 proxies the service of a certain user, and the service request received by the node 4 When the information is still the service of the user, node 2 may not allow node 4 to proxy the service, and still another node of node 2 shall proxy the user's service.
  • Step 605 The node sets a Semi-Active identifier in the data area corresponding to the user identity or the resource ID, and then returns a response message to the node 4;
  • the node 2 can also return a response message to the node 3, and after receiving the message, the node 3 Node 4 forwards the response message;
  • the Semi-Active identifier may include: address information of the node 4, for example: Node ID information of the node 4; the Semi-Active identifier is used to identify that the service of the user has been processed by the backup node proxy;
  • Node 2 can synchronize the set Semi-Active ID to all of its own backup nodes.
  • Step 606 After receiving the response message, the node 4 processes the service instead of the node 2, and returns a service request response message to the node 1 after the processing is completed, and then proceeds to step 607;
  • step 603-605 needs to be performed, and after the node 4 receives the response message of the node 2, the proxy node 2 processes the service, or the node 4 can cooperate with the node 2 Between the agreement, the direct proxy node 2 processes the service; if the service request sent by the node 1 only involves the read operation service, the node 4 may not require the consent of the node 2, that is, the steps 603 to 605 are not executed, and the direct proxy node 2 processes Service; wherein the protocol can be set as needed.
  • Step 607 After the node 2 overload state is canceled, the node 4 performs data synchronization with the node 2, and the node 4 synchronizes the change data generated when the proxy node 2 processes the service to the node 2, and ends the current processing flow;
  • the node 4 can be notified, and after receiving the notification, the node 4 performs data synchronization with the node 2; or, after the node 2 cancels the overload state, it determines whether the semi-active identifier exists.
  • User data acquires data from the node 4, thereby implementing data synchronization; or, the node 2 can directly obtain data from the node 4 according to the address information of the node 4 in the Semi-Active identifier, thereby implementing data synchronization; or The node 4 periodically queries the overload state of the node 2, and finds that the node 2 synchronizes the data to the node 2 after canceling the overload state; wherein, the node 4 can query whether the overload state of the node is canceled by periodically sending a message to the node, or The overload server can be periodically queried whether the overload status of node 2 is canceled. Step 608: Node 2 returns a reject message to node 4.
  • Step 609 After receiving the reject message, the node 4 returns a reject message to the node 1, and then ends the current processing flow.
  • Embodiment 4 is a diagrammatic representation of Embodiment 4:
  • Node 1 is a node that sends a message
  • Node 2 is a node that receives a message, and is overloaded
  • node 3 is a first backup node of node 2, that is, a preferred backup when node 2 is overloaded. All the backup nodes of the node 2 are overloaded.
  • the overload refers to the preset threshold value of the load of the node.
  • the method for controlling the overload in the P2P network in this embodiment is as shown in FIG. 7 . Includes the following steps:
  • Step 701 After the node 1 senses that the node 2 is overloaded, the node 1 selects to send a service request message to the node 3 according to the overload policy;
  • the node 1 can be aware that the node 2 is overloaded by the prior art; the node 1 can obtain the node 3 through the DHT algorithm, and then send a service request message to the node 3 according to the data;
  • the overload strategy may be set according to requirements, and the overload strategy may include: an overloaded valve value, a full-load valve value, etc.; for example: a valve value that can be set to be overloaded is 90%, and a full-load valve value is 96%, etc.;
  • the service request message includes: a user identity or a resource ID;
  • the node 1 does not sense that the node 2 is overloaded. After the node 1 sends a service request message to the node, the node 2 forwards the service request message to the node 3 due to overload.
  • Step 702 After receiving the service request message, the node 3 senses that all the backup nodes of the node 2 are overloaded, and notifies the node 1;
  • Step 703 After receiving the notification, the node 1 discards or sends the data according to the overload policy.
  • the specific processing procedure for the node 1 to discard or send the message proportionally may be used. Process.
  • Embodiment 5 is a diagrammatic representation of Embodiment 5:
  • the application scenario of this embodiment is as follows: When a new node joins the P2P network, the original responsible node is overloaded, and the original responsible node adopts the control overload method in the first embodiment, the second embodiment, and the third embodiment.
  • the backup node agent responsible for the node is responsible for the node processing service.
  • the method for implementing data migration in this embodiment includes the following steps:
  • Step 801 The newly added node sends a join request message to the original responsible node to obtain the data to be responsible.
  • Step 802 After receiving the request message, the original responsible node migrates the data that the newly added node is responsible for to the newly added node according to the P2P network algorithm.
  • the specific processing process of migrating the data that the newly added node is responsible for to the newly added node is exactly the same as the existing processing, and details are not described herein again.
  • Step 803 The newly joined node receives the migration data, and finds that the change data generated when the agent obtains the proxy from the backup node of the original responsible node after the Semi-Active or Non-Trust identifier is partially set in the migration data;
  • the new joining node finds that the existing part of the mobile data is set with the Semi-Active or Non-Trust identifier, it is considered that the data currently set with the Semi-Active or Non-Tmst identifier is incomplete data, and needs to be from the original responsible node.
  • the change data generated by the backup node when acquiring the proxy; the newly added node may obtain the change data generated by the proxy from the backup node of the original responsible node according to the address information carried in the identifier; or, may obtain the backup node of the original responsible node according to the DHT algorithm. According to this, the change data generated when the proxy is obtained from the backup node of the original responsible node.
  • Step 804 The backup node of the original responsible node migrates the change data generated when the agent is responsible for processing the service to the newly joined node.
  • the present invention further provides a system for controlling overload in a P2P network.
  • the system includes: a first node 91, and a Two nodes 92; wherein
  • the first node 91 after the node for receiving the message is overloaded, receives the message sent by the second node 91;
  • the second node 92 after sensing that the node receiving the message is overloaded, directly sends a message to the first node 91.
  • the first node 91 is a backup node of a node that receives a message
  • the second node 92 is a node that transmits a message.
  • the first node 91 is further configured to: after receiving the message sent by the second node 92, proxy the node receiving the message to process the service, and return the service request response message to the second node 92 after the processing is completed;
  • the second node 92 is further configured to receive a service request response message returned by the first node 91.
  • the system may further include: a third node 93, configured to: after receiving the proxy solicitation request message sent by the first node 91, set an incompleteness identifier for the data to be proxied by the first node 91, and then return to the first node 91 Reply message
  • the first node 91 is further configured to send a proxy solicitation request message to the third node 93, and after receiving the response message returned by the third node 93, proxy the third node 93. Processing business; or,
  • the first node 91 is further configured to send a proxy solicitation request message to the third node 93, and after the timer expires, and no message returned by the third node 93 is received, , setting Non-SYN for the data to be proxied, and proxying the third node 93 to process the service;
  • the third node 93 refers to a node that receives a message
  • the first node 91 is a backup node of the third node 93.
  • the third node 93 is further configured to forward the received message sent by the second node 92 to the first node 91;
  • the second node 92 is further configured to send a message to the third node 93.
  • the third node 93 is further configured to perform data synchronization with the first node 91 after the overload state is canceled;
  • the first node 91 is further configured to perform data synchronization with the third node 93 after the third node 93 cancels the overload state.
  • the first node 91 is further configured to notify the second node 92 after receiving the message sent by the second node 92 and sensing that all the backup nodes of the third node 93 are overloaded;
  • the second node 92 is further configured to: after receiving the notification of the first node 91, discard or send the message proportionally according to the overload policy.
  • the present invention further provides a system for data migration in a process of overloading a P2P network node based on the method for data migration in a P2P network node overload process, the system comprising: a fourth node, a fifth node, and a sixth node; among them,
  • the fourth node when used to join the peer-to-peer network, sends a join request message to the fifth node, and after receiving the migrated data migrated by the fifth node, and determining that the data of some users in the received migration data is incomplete, Obtaining data of the part of the user from the sixth node;
  • the fifth node is further configured to: after receiving the join request message sent by the fourth node, migrate the data that the fourth node should be responsible to to the fourth node;
  • the sixth node is configured to provide data of the part of the user to the fourth node.
  • the fifth node is overloaded
  • the sixth node is the backup node of the fifth node.
  • the data of the part of the user includes the change data generated when the sixth node agent is used.
  • the specific processing procedure of the fourth node and the sixth node in the system for data migration in the overload process of the P2P network node of the present invention has been detailed in the above, and will not be described again.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Disclosed is a method for controlling overload in a peer-to-peer network, comprising: after a message receiving node is overloaded, a backup node of the message receiving node receiving a message sent by a message sending node. Also disclosed is a system for controlling overload in a peer-to-peer network. With the method and system of the present invention, when a node of a telecommunication network into which the peer-to-peer network technology is introduced is heavily loaded, the service connection rate can be effectively improved, thereby ensuring the continuity of telecommunication services and improving user experience.

Description

一种对等网络中控制过负荷的方法及系统 技术领域  Method and system for controlling overload in peer-to-peer network
本发明涉及对等(P2P, Peer-to-Peer ) 网络技术, 特别是指一种 P2P网 络中控制过负荷的方法及系统。 背景技术  The present invention relates to peer-to-peer (P2P, Peer-to-Peer) network technology, and more particularly to a method and system for controlling overload in a P2P network. Background technique
目前, P2P网络技术在文件交换、 分布式计算、 以及服务共享等方面已 经充分显示出了强大的技术优势。然而, P2P网络技术的应用主要集中在因 特网 (Internet ) 的应用中, 而在传统的电信网络中尚未大规模应用。 由于 目前及将来的电信网络中,会话控制的主流为会话初始化协议( SIP, Session Initiation Protocol ) , 因此, 如果将 Ρ2Ρ网络技术引入到电信网络中, 就要 求必须保证 SIP在 P2P网络中的应用, 同时要求能够运行各类典型业务。  At present, P2P network technology has fully demonstrated strong technical advantages in file exchange, distributed computing, and service sharing. However, the application of P2P network technology is mainly concentrated in the application of the Internet, but has not been applied on a large scale in the traditional telecommunication network. Since the mainstream of session control is the Session Initiation Protocol (SIP) in current and future telecommunication networks, if the network technology is introduced into the telecommunication network, it is required to ensure the application of SIP in the P2P network. It also requires the ability to run a variety of typical businesses.
基于以上考虑, 目前, 业界的许多研究机构都在致力于如何将 P2P网 络技术引入到电信网络中的研究, 图 1 为现有研究中得到大多数研究者与 研究机构认同的一种 P2P核心网架构示意图, 如图 1所示, P2P核心网包 括: P2P叠加网 101、 P2P节点 102、 非 P2P终端 103、 以及 P2P终端 104。 其中, P2P叠加网 101为由各类担负不同角色的 P2P节点 102组成的逻辑 网络; P2P节点 102为 P2P叠加网 101中的基本组成部分, 是能够给 P2P 叠加网 101中其它节点提供存储和传送服务的节点; 非 P2P终端 103为接 入到 P2P叠加网 101中的不支持任何 P2P协议、 仅支持 SIP的终端设备; P2P终端 104为接入到 P2P叠加网 101中的既支持 P2P协议、 也支持 SIP 的终端设备, 由于终端设备, 尤其是手持终端设备的能力较弱, 因此, 在 实际部署时, P2P终端 104—般仅仅作为 P2P客户端接入到 P2P叠加网 101 中, 并不承担存储、 传送等服务器功能, 并且, 考虑到电信营运的需要, 要求 P2P终端 104与非 P2P终端 103都必须通过就近的 P2P节点 102接入 到 P2P叠加网 101中, 当 P2P节点 102同时作为非 P2P终端 103、以及 P2P 终端 104的接入节点时, 对于非 P2P终端 103, P2P节点 102负责将非 P2P 终端 103采用的 SIP与 P2P叠加网 101内部路由 SIP所采用的协议进行转 换, 之后对消息进行中继, 对于 P2P终端 104, 则 P2P节点 102仅需要对 消息进行中继。 Based on the above considerations, many research institutions in the industry are currently working on how to introduce P2P network technology into telecom networks. Figure 1 shows a P2P core network that most researchers and research institutions agree with in existing research. Schematic diagram of architecture, as shown in FIG. 1, the P2P core network includes: a P2P overlay network 101, a P2P node 102, a non-P2P terminal 103, and a P2P terminal 104. The P2P overlay network 101 is a logical network composed of P2P nodes 102 of different roles; the P2P node 102 is a basic component of the P2P overlay network 101, and is capable of providing storage and transmission to other nodes in the P2P overlay network 101. The node of the service; the non-P2P terminal 103 is a terminal device that does not support any P2P protocol and only supports SIP in the P2P overlay network 101; the P2P terminal 104 supports both the P2P protocol and the P2P overlay network 101. The SIP-enabled terminal device is weak in the terminal device, especially the handheld terminal device. Therefore, in actual deployment, the P2P terminal 104 is only used as a P2P client to access the P2P overlay network 101, and does not assume storage. Server functions such as transmission, and, taking into account the needs of telecommunications operations, Both the P2P terminal 104 and the non-P2P terminal 103 are required to access the P2P overlay network 101 through the nearest P2P node 102. When the P2P node 102 simultaneously serves as the access node of the non-P2P terminal 103 and the P2P terminal 104, for non-P2P The terminal 103, the P2P node 102 is responsible for converting the SIP adopted by the non-P2P terminal 103 and the protocol used for routing the SIP inside the P2P overlay network 101, and then relaying the message. For the P2P terminal 104, the P2P node 102 only needs to message. Relay.
在 P2P叠加网 101中, P2P节点 102之间根据分布式哈希表 ( DHT, Distributed Hash Table ) 算法, 实现节点之间数据的动态实时备份。  In the P2P overlay network 101, the P2P nodes 102 implement dynamic real-time backup of data between nodes according to a Distributed Hash Table (DHT) algorithm.
图 2为传统的网络过负荷控制的方法流程示意图, 如图 2所示, 该流 程包括以下步驟:  2 is a schematic flowchart of a conventional network overload control method. As shown in FIG. 2, the process includes the following steps:
步驟 201 : 前向节点感知后向节点过负荷, 这里, 前向节点感知后向节 点过负荷的途径为: 后向节点或过负荷服务器告知前向节点后向节点过负 荷, 或者, 前向节点根据消息延迟推断出后向节点过负荷;  Step 201: The forward node senses that the backward node is overloaded. Here, the forward node senses that the backward node is overloaded by: the backward node or the overload server notifies the forward node that the backward node is overloaded, or the forward node Inferring that the backward node is overloaded according to the message delay;
步驟 202: 前向节点依据过负荷策略及后向节点过负荷的程度,按照既 定的比例丟弃或发送消息给后向节点, 以减少后向节点的负荷。  Step 202: The forward node discards or sends a message to the backward node according to the predetermined ratio according to the overload policy and the backward node overload, so as to reduce the load of the backward node.
从上面的描述中可以看出, 当前向节点感知后向节点过负荷时, 会按 照既定的比例丟弃或发送消息给后向节点, 如果采用上述过负荷控制方法, 控制引入 P2P网络技术的电信网络中的过负荷, 则无法体现 P2P网络技术 的优势, 反而会扩大 P2P网络的不稳定性, 具体地讲, P2P网络的优势在 于: 以数量换取高质量, 但是, P2P网络中的单个节点的稳定性要比传统的 电信网络中的单个节点的稳定性要差, 因此, 在网络高负荷运作时候, P2P 网络中的节点更容易形成资源过负荷, 如果按照传统的过负荷控制方式, 则会导致高负荷的时候, 引入 P2P网络技术的电信网络的接通率远远低于 传统的电信网络的接通率, 如此, 会大大降低用户体验。 发明内容 As can be seen from the above description, when the node is aware of the backward node overload, it will discard or send the message to the backward node according to the established ratio. If the above overload control method is adopted, the telecommunications that introduces the P2P network technology are controlled. The overload in the network can not reflect the advantages of P2P network technology, but will increase the instability of P2P network. Specifically, the advantages of P2P network are: exchange quality for quantity, but single node in P2P network The stability is less stable than the single node in the traditional telecommunication network. Therefore, when the network is under heavy load, the nodes in the P2P network are more likely to form resource overload. If the traditional overload control method is used, When the load is high, the connection rate of the telecommunication network that introduces the P2P network technology is far lower than that of the traditional telecommunication network, thus greatly reducing the user experience. Summary of the invention
有鉴于此, 本发明的主要目的在于提供一种 P2P网络中控制过负荷的 方法及系统, 能保证电信业务的连续性, 进而提升用户体验。  In view of this, the main object of the present invention is to provide a method and system for controlling overload in a P2P network, which can ensure continuity of telecommunication services and thereby improve user experience.
为达到上述目的, 本发明的技术方案是这样实现的:  In order to achieve the above object, the technical solution of the present invention is achieved as follows:
本发明提供了一种 P2P网络中控制过负荷的方法, 该方法包括: 接收消息的节点过负荷后, 所述接收消息的节点的备份节点接收发送 消息的节点发送的消息。  The present invention provides a method for controlling overload in a P2P network, the method comprising: after a node receiving a message is overloaded, the backup node of the node receiving the message receives a message sent by a node that sends the message.
上述方案中, 该方法进一步包括:  In the above solution, the method further includes:
所述发送消息的节点感知所述接收消息的节点过负荷后, 直接向所述 接收消息的节点的备份节点发送消息; 或者,  After the node that sends the message senses that the node that receives the message is overloaded, it sends a message directly to the backup node of the node that receives the message; or
所述接收消息的节点过负荷后, 将所述发送消息的节点发送的消息转 发给所述备份节点。  After the node receiving the message is overloaded, the message sent by the node that sends the message is forwarded to the backup node.
上述方案中, 该方法进一步包括:  In the above solution, the method further includes:
所述备份节点收到消息后, 代理所述接收消息的节点处理业务, 并在 处理完成后, 向所述发送消息的节点返回业务请求应答消息。  After receiving the message, the backup node proxies the node receiving the message to process the service, and after the processing is completed, returns a service request response message to the node that sends the message.
上述方案中, 在代理所述接收消息的节点处理业务之前, 该方法进一 步包括:  In the above solution, before the proxying the node receiving the message to process the service, the method further includes:
所述备份节点向所述接收消息的节点发送代理征求请求消息, 并在收 到所述代理征求请求消息应答消息后, 代理所述接收消息的节点处理业务; 或者,  And the backup node sends a proxy solicitation request message to the node that receives the message, and after receiving the proxy solicitation request message response message, proxying the node receiving the message to process the service; or
所述备份节点向所述接收消息的节点发送代理征求请求消息; 在定时器超时, 且未收到所述接收消息的节点返回的任何消息后, 所 述备份节点为即将代理的用户数据设置未同步标识, 之后代理所述接收消 息的节点处理业务。  The backup node sends a proxy solicitation request message to the node that receives the message; after the timer expires, and the message returned by the node receiving the message is not received, the backup node sets the user data to be proxied. Synchronizing the identity, and then proxying the node receiving the message to process the service.
上述方案中, 在收到所述代理征求请求消息应答消息之前, 该方法进 一步包括: In the above solution, before receiving the proxy solicitation request message response message, the method proceeds One step includes:
所述接收消息的节点收到代理征求请求消息, 且允许所述备份节点代 理处理业务后, 所述接收消息的节点为所述备份节点即将代理的用户数据 设置不完整性标识, 之后向所述备份节点返回应答消息。  After the node receiving the message receives the agent solicitation request message, and allows the backup node agent to process the service, the node receiving the message sets an incompleteness identifier for the user data to be proxied by the backup node, and then The backup node returns a reply message.
上述方案中, 所述不完整性标标识包含所述备份节点的地址信息; 在为所述备份节点即将代理的用户数据设置不完整性标识后, 该方法 进一步包括:  In the above solution, the incompleteness identifier includes the address information of the backup node; after the incompleteness identifier is set for the user data to be proxied by the backup node, the method further includes:
所述接收消息的节点将所述不完整性标识同步到所述接收消息的节点 的所有备份节点。  The node receiving the message synchronizes the incompleteness identifier to all backup nodes of the node receiving the message.
上述方案中, 当所述接收消息的节点过负荷状态取消后, 该方法进一 步包括:  In the above solution, after the node overload status of the received message is canceled, the method further includes:
所述接收消息的节点与所述备份节点进行数据同步。  The node receiving the message performs data synchronization with the backup node.
上述方案中, 所述与所述备份节点进行数据同步, 为:  In the above solution, the data synchronization with the backup node is:
所述备份节点将代理所述接收消息的节点处理业务时产生的变更数据 同步给所述接收消息的节点。  The backup node synchronizes the change data generated when the node receiving the message processes the service to the node receiving the message.
上述方案中, 该方法进一步包括:  In the above solution, the method further includes:
所述备份节点收到消息, 且感知所述接收消息的节点的所有备份节点 均过负荷时, 通知所述发送消息的节点;  Notifying the node that sends the message when the backup node receives the message and senses that all backup nodes of the node receiving the message are overloaded;
所述发送消息的节点收到通知后, 依据过负荷策略, 按比例丟弃或发 送消息。  After receiving the notification, the node that sends the message discards or sends the message proportionally according to the overload policy.
上述方案中, 该方法进一步包括:  In the above solution, the method further includes:
所述接收消息的节点过负荷, 且所述接收消息的节点或所述接收消息 的节点的其它备份节点再次收到所述发送消息的节点发送的消息后, 将所 述消息转发至对应的用户数据区中标记的地址。  The node that receives the message is overloaded, and the node that receives the message or the other backup node of the node that receives the message receives the message sent by the node that sends the message again, and then forwards the message to the corresponding user. The address marked in the data area.
本发明还提供了一种 P2P网络节点过负荷过程中数据迁移的方法, 该 方法包括: The present invention also provides a method for data migration in a P2P network node overload process, Methods include:
新加入节点向负责节点发送加入请求消息;  The new joining node sends a join request message to the responsible node;
所述负责节点将新加入节点应负责的数据迁移给所述新加入节点; 所述新加入节点收到迁移数据, 且确定收到的迁移数据中存在部分用 户的数据不完整后, 向所述负责节点的备份节点获取所述部分用户的数据。  The responsible node migrates the data that the newly added node is responsible for to the newly joined node; after the new joining node receives the migration data, and determines that the data of some users in the received migration data is incomplete, the The backup node responsible for the node acquires data of the part of the user.
上述方案中, 所述确定收到的迁移数据中存在部分用户的数据不完整, 为:  In the foregoing solution, the determining that the data of the part of the user in the migrated data is incomplete is:
所述新加入节点根据用户的数据中的不完整性标识, 确定所述用户的 数据不完整。  The newly joining node determines that the data of the user is incomplete according to the incompleteness identifier in the data of the user.
上述方案中, 所述不完整性标识包含所述备份节点的地址信息; 所述向所述负责节点的备份节点获取所述部分用户的数据, 为: 所述新加入节点根据所述备份节点的地址信息 , 向所述备份节点获取 所述部分用户的数据。  In the above solution, the incompleteness identifier includes the address information of the backup node; the acquiring, by the backup node of the responsible node, the data of the part of the user, where: the new joining node is according to the backup node Address information, obtaining data of the part of the user from the backup node.
上述方案中, 所述部分用户的数据包括所述备份节点代理时产生的变 更数据。  In the above solution, the data of the part of the user includes the change data generated when the backup node agent.
本发明还提供了一种对等网络中控制过负荷的系统, 该系统包括: 第 一节点, 为接收消息的节点的备份节点, 用于接收消息的节点过负荷后, 接收发送消息的节点发送的消息。  The present invention also provides a system for controlling overload in a peer-to-peer network, the system comprising: a first node, which is a backup node of a node that receives a message, and a node that receives a message is overloaded, and sends a node that sends a message to send Message.
上述方案中, 第一节点, 还用于收到第二节点发送的消息后, 代理所 述接收消息的节点处理业务, 并在处理完成后, 向第二节点返回业务请求 应答消息;  In the above solution, the first node is further configured to: after receiving the message sent by the second node, the node that receives the message processing the service, and after the processing is completed, return a service request response message to the second node;
该系统进一步包括: 第二节点, 用于接收第二节点返回的业务请求应 答消息。  The system further includes: a second node, configured to receive a service request response message returned by the second node.
上述方案中, 该系统进一步包括: 第三节点, 用于收到第一节点发送 的代理征求请求消息后, 为第一节点即将代理的数据设置不完整性标识, 之后向第一节点返回应答消息; In the above solution, the system further includes: a third node, configured to: after receiving the agent solicitation request message sent by the first node, set an incompleteness identifier for the data to be proxied by the first node, Returning a response message to the first node;
在代理第三节点处理业务之前, 所述第一节点, 还用于向第三节点发 送代理征求请求消息, 并在收到第三节点返回的应答消息后, 代理第三节 点处理业务; 或者,  Before the third node processes the service, the first node is further configured to send a proxy solicitation request message to the third node, and after receiving the response message returned by the third node, proxy the third node to process the service; or
在代理第三节点处理业务之前, 所述第一节点, 还用于向第三节点发 送代理征求请求消息, 并在定时器超时, 且未收到第三节点返回的任何消 息后, 为即将代理的数据设置未同步标识, 并代理第三节点处理业务。  Before the third node processes the service, the first node is further configured to send a proxy solicitation request message to the third node, and after the timer expires, and the message returned by the third node is not received, The data settings are not synchronized, and the third node is acting on the business.
上述方案中, 所述第三节点, 用于过负荷后, 将收到的第二节点发送 的消息转发给第一节点;  In the foregoing solution, the third node, after being used for overloading, forwards the received message sent by the second node to the first node;
所述第二节点, 还用于向第三节点发送消息; 或者,  The second node is further configured to send a message to the third node; or
所述第二节点, 还用于感知第三节点过负荷后, 直接向第一节点发送 消息。  The second node is further configured to: after sensing that the third node is overloaded, directly send a message to the first node.
上述方案中, 所述第三节点, 还用于过负荷状态取消后, 与第一节点 进行数据同步;  In the above solution, the third node is further configured to perform data synchronization with the first node after the overload state is canceled;
所述第一节点, 还用于第三节点过负荷状态取消后, 与第三节点进行 数据同步。  The first node is further configured to perform data synchronization with the third node after the third node is overloaded.
上述方案中, 所述第一节点, 还用于收到第二节点发送的消息后, 且 感知第三节点的所有备份节点均过负荷时, 通知第二节点;  In the above solution, the first node is further configured to: after receiving the message sent by the second node, and notify all the backup nodes of the third node that the load is overloaded, notify the second node;
所述第二节点, 还用于收到第一节点的通知后, 依据过负荷策略, 按 比例丟弃或发送消息。  The second node is further configured to: after receiving the notification of the first node, discard or send the message according to the overload policy.
本发明还提供了一种 P2P网络节点过负荷过程中数据迁移的系统, 该 系统包括: 第四节点、 第五节点、 以及第六节点; 其中,  The present invention also provides a system for data migration during a P2P network node overload process, the system comprising: a fourth node, a fifth node, and a sixth node;
第四节点, 用于加入对等网络时, 向第五节点发送加入请求消息, 并 在收到第五节点迁移的迁移数据, 且确定收到的迁移数据中存在部分用户 的数据不完整后, 向第六节点获取所述部分用户的数据; 所述第五节点, 还用于收到第四节点发送的加入请求消息后, 将第四 节点应负责的数据迁移给第四节点; The fourth node, when used to join the peer-to-peer network, sends a join request message to the fifth node, and after receiving the migrated data migrated by the fifth node, and determining that the data of some users in the received migration data is incomplete, Obtaining data of the part of the user from the sixth node; The fifth node is further configured to: after receiving the join request message sent by the fourth node, migrate the data that the fourth node should be responsible to to the fourth node;
所述第六节点, 用于向第四节点提供所述部分用户的数据。  The sixth node is configured to provide data of the part of the user to the fourth node.
上述方案中, 所述部分用户的数据包括所述第六节点代理时产生的变 更数据。  In the above solution, the data of the part of the user includes the change data generated when the sixth node agent.
本发明提供的 P2P网络中控制过负荷的方法及系统, 接收消息的节点 过负荷后, 所述接收消息的节点的备份节点接收发送消息的节点发送的消 息, 在接收消息的节点过负荷时, 由接收消息的节点的备份节点代理接收 消息的节点处理业务, 如此, 能在引入 P2P网络技术的电信网络的节点高 负荷时, 有效地提高业务接通率, 从而保证电信业务的连续性, 进而提升 用户体险。  The method and system for controlling overload in a P2P network provided by the present invention, after the node receiving the message is overloaded, the backup node of the node receiving the message receives the message sent by the node sending the message, when the node receiving the message is overloaded, The node receiving the message by the backup node agent of the node receiving the message processes the service, so that when the node of the telecommunication network introducing the P2P network technology is under heavy load, the service connection rate is effectively improved, thereby ensuring the continuity of the telecommunication service, and further Improve user physical insurance.
本发明提供的 P2P节点过负荷过程中数据迁移的方法及系统, 新加入 节点向负责节点发送加入请求消息; 所述负责节点将新加入节点应负责的 数据迁移给所述新加入节点; 所述新加入节点收到迁移数据, 且确定收到 的迁移数据中存在部分用户的数据不完整后, 向所述负责节点的备份节点 获取所述部分用户的数据, 如此, 能在引入 P2P网络技术的电信网络的节 点高负荷时, 确保迁移数据的完整性, 进而保证网络的正常运行, 提升用 户体验。 附图说明  The method and system for data migration in a P2P node overload process provided by the present invention, the newly joining node sends a join request message to the responsible node; the responsible node migrates data to be newly added by the newly added node to the newly joined node; After the new joining node receives the migration data, and determines that the data of some users in the received migration data is incomplete, the data of the part of the user is obtained from the backup node of the responsible node, so that the P2P network technology can be introduced. When the nodes of the telecommunication network are under heavy load, the integrity of the migrated data is ensured, thereby ensuring the normal operation of the network and improving the user experience. DRAWINGS
图 1为现有的引入 P2P网络技术的电信网络架构示意图;  FIG. 1 is a schematic diagram of a telecommunication network architecture of an existing P2P network technology;
图 2为传统的网络过负荷控制的方法流程示意图;  2 is a schematic flow chart of a conventional network overload control method;
图 3为本发明 P2P网络中控制过负荷的方法流程示意图;  3 is a schematic flowchart of a method for controlling an overload in a P2P network according to the present invention;
图 4为实施例一 P2P网络中控制过负荷的方法流程示意图;  4 is a schematic flowchart of a method for controlling an overload in a P2P network according to Embodiment 1;
图 5为实施例二 P2P网络中控制过负荷的方法流程示意图;  FIG. 5 is a schematic flowchart of a method for controlling an overload in a P2P network according to Embodiment 2;
图 6为实施例三 P2P网络中控制过负荷的方法流程示意图; 图 7为实施例四 P2P网络中控制过负荷的方法流程示意图; 6 is a schematic flowchart of a method for controlling an overload in a P2P network in Embodiment 3; 7 is a schematic flowchart of a method for controlling an overload in a P2P network in Embodiment 4;
图 8为实施例五实现数据迁移的方法流程示意图;  8 is a schematic flowchart of a method for implementing data migration in Embodiment 5;
图 9为本发明 P2P网络中控制过负荷的系统结构示意图。 具体实施方式  FIG. 9 is a schematic structural diagram of a system for controlling overload in a P2P network according to the present invention. detailed description
本发明的基本思想是: 接收消息的节点过负荷后, 所述接收消息的节 点的备份节点接收发送消息的节点发送的消息。  The basic idea of the present invention is: After the node receiving the message is overloaded, the backup node of the node receiving the message receives the message sent by the node transmitting the message.
下面结合附图及具体实施例对本发明再作进一步详细的说明。  The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
本发明 P2P网络中控制过负荷的方法, 如图 3所示, 包括以下步驟: 步驟 301: 接收消息的节点过负荷后, 所述接收消息的节点的备份节点 接收发送消息的节点发送的消息;  The method for controlling the overload in the P2P network of the present invention, as shown in FIG. 3, includes the following steps: Step 301: After the node receiving the message is overloaded, the backup node of the node that receives the message receives the message sent by the node that sends the message;
这里, 在所述接收消息的节点的备份节点接收发送消息的节点发送的 消息之前, 该方法可以进一步包括:  Here, before the backup node of the node that receives the message receives the message sent by the node that sends the message, the method may further include:
发送消息的节点通过现有技术感知接收消息的节点过负荷后, 直接向 所述备份节点发送消息; 或者,  The node that sends the message directly sends the message to the backup node after the node that receives the message is overloaded by the prior art; or
接收消息的节点过负荷后, 将发送消息的节点发送的消息转发给所述 备份节点。  After the node receiving the message is overloaded, the message sent by the node that sent the message is forwarded to the backup node.
步驟 302: 所述备份节点收到消息后, 代理所述接收消息的节点处理业 务, 并在处理完成后, 向所述发送消息的节点返回业务请求应答消息; 所述备份节点收到消息并在代理所述接收消息的节点处理业务之前, 该方法还可以进一步包括:  Step 302: After receiving the message, the backup node processes the service of the node receiving the message, and after the processing is completed, returns a service request response message to the node that sends the message; the backup node receives the message and Before the agent receiving the message processes the service, the method may further include:
所述备份节点向所述接收消息的节点发送代理征求请求消息; 所述接收消息的节点收到请求消息后, 为所述备份节点即将代理的用 户数据设置不完整性标识, 之后向所述备份节点返回应答消息;  The backup node sends a proxy solicitation request message to the node that receives the message; after receiving the request message, the node receiving the message sets an incompleteness identifier for the user data to be proxied by the backup node, and then goes to the backup. The node returns a reply message;
所述备份节点收到应答消息后, 代理所述接收消息的节点处理业务; 或者, 所述备份节点向所述接收消息的节点发送代理征求请求消息; 在定时器超时, 且未收到所述接收消息的节点返回的任何消息后, 所 述备份节点为即将代理的用户数据设置未同步 ( Non-SYN ) 标识, 之后代 理所述接收消息的节点处理业务; After receiving the response message, the backup node proxyes the node that receives the message to process the service; or The backup node sends a proxy solicitation request message to the node that receives the message; after the timer expires, and the message returned by the node receiving the message is not received, the backup node sets the user data to be proxied. Synchronizing (Non-SYN) identification, and then proxying the node receiving the message to process the service;
其中, 所述不完整性标识, 用于标识该用户的数据不完整; 所述不完 整性标识可以进一步包含所述备份节点的地址信息, 比如: 所述备份节点 的节点 (Node )标识 ( ID, IDentity )信息; 在为所述备份节点即将代理的 用户数据设置不完整性标识后, 该方法还可以进一步包括: 所述接收消息 的节点将所述不完整性标识同步到所述接收消息的节点的所有备份节点; 之后如果所述接收消息的节点或所述接收消息的节点的其它备份节点再次 收到的消息为所述备份节点代理的用户的业务时, 则将所述消息转发至所 述用户数据区中标记的地址, 即: 所述备份节点的地址;  The incompleteness identifier is used to identify that the data of the user is incomplete. The incompleteness identifier may further include address information of the backup node, for example, a node (Node) identifier (ID) of the backup node. The IDentity of the information; after setting the incompleteness identifier for the user data to be proxied by the backup node, the method may further include: the node receiving the message synchronizing the incompleteness identifier to the received message All backup nodes of the node; then if the message received by the node receiving the message or the other backup node of the node receiving the message is the service of the user of the backup node agent, then forwarding the message to the Describe the address marked in the user data area, that is, the address of the backup node;
所述不完整性标识具体可以是半激活 (Semi-Active ) 标识; 所述 Semi-Active标识用于标识该用户的业务已由备份节点代理处理; Non-SYN 标识用于表明该用户的数据未进行同步;  The non-integrity identifier may be a semi-active identifier; the Semi-Active identifier is used to identify that the user's service has been processed by the backup node proxy; and the Non-SYN identifier is used to indicate that the user's data is not Synchronize;
当定时器超时且未收到所述接收消息的节点的消息时, 所述备份节点 认为所述接收消息的节点为满负荷状态。  When the timer expires and the message of the node receiving the message is not received, the backup node considers that the node receiving the message is in a full load state.
本发明还提供了一种 P2P网络节点过负荷过程中数据迁移的方法, 该 方法包括:  The present invention also provides a method for data migration in a P2P network node overload process, the method comprising:
新加入节点向负责节点发送加入请求消息;  The new joining node sends a join request message to the responsible node;
负责节点收到请求消息后, 将新加入节点应负责的数据迁移给新加入 节点?  After receiving the request message, the responsible node migrates the data that the newly added node should be responsible for to the newly joined node.
新加入节点收到迁移数据, 且确定收到的迁移数据存在部分用户的数 据不完整后, 向负责节点的备份节点获取所述部分用户的数据;  After the newly added node receives the migration data, and determines that the data of the part of the received migration data is incomplete, the data of the part of the user is obtained from the backup node of the responsible node;
其中, 所述负责节点过负荷, 将新加入节点应负责的数据迁移给新加 入节点的具体处理过程可采用现有的处理过程; Wherein, the responsible node is overloaded, and the data that the newly added node should be responsible for is migrated to the new one. The specific processing of the ingress node can adopt the existing processing procedure;
当迁移数据中存在部分设置有不完整性标识 Semi-Active 或不可信 ( Non-Trust )标识的用户的数据时, 则新加入节点确定收到的迁移数据中 存在部分用户的数据不完整; 所述 Non-Trust标识用于标识数据不可信任, 当所述接收消息的节点在自身的满负荷状态取消后, 会为自身维护的所有 数据设置 Non-Trust标识;  When there is data in a part of the migration data that is set with a non-integrity identifier Semi-Active or a non-trusted (Non-Trust) identifier, the newly joined node determines that some of the users in the received migration data are incomplete; The Non-Trust identifier is used to identify that the data is untrustworthy. When the node receiving the message cancels its full load state, it sets a Non-Trust identifier for all data maintained by itself.
所述不完整性标识还可以进一步包含所述备份节点的地址信息, 比如: 所述备份节点的节点 ID信息; 所述新加入节点根据所述备份节点的地址信 息, 向所述备份节点获取所述部分用户的数据;  The incompleteness identifier may further include address information of the backup node, such as: node ID information of the backup node; the new joining node acquires the location from the backup node according to the address information of the backup node. The data of some users;
所述部分用户的数据包括所述备份节点代理时产生的变更数据。  The data of the part of the user includes the change data generated when the backup node agent.
当所述接收消息的节点过负荷状态取消后 , 与所述备份节点进行数据 同步; 具体地, 所述备份节点将代理所述接收消息的节点处理业务时产生 的变更数据同步给所述接收消息的节点。  After the node overload status of the message is received, the data is synchronized with the backup node. Specifically, the backup node synchronizes the change data generated when the node that receives the message processes the service to the received message. Node.
当所述备份节点收到消息, 且感知所述接收消息的节点的所有备份节 点均过负荷时, 通知所述发送消息的节点; 所述发送消息的节点收到通知 后, 依据过负荷策略, 按比例丟弃或发送消息。  And when the backup node receives the message, and all the backup nodes of the node that senses the received message are overloaded, notify the node that sends the message; after the node that sends the message receives the notification, according to the overload policy, Discard or send messages proportionally.
实施例一:  Embodiment 1:
本实施例的应用场景为: 节点 1为发送消息的节点, 节点 2为接收消 息的节点, 且过负荷, 节点 3为节点 2的备份节点, 这里, 所述过负荷是 指节点 2的负荷达到过负荷预设的阀门值, 本实施例 P2P网络中控制过负 荷的方法, 如图 4所示, 包括以下步驟:  The application scenario of this embodiment is as follows: Node 1 is a node that sends a message, Node 2 is a node that receives a message, and is overloaded, and node 3 is a backup node of node 2. Here, the overload refers to the load of node 2 is reached. Overloading the preset valve value, the method for controlling the overload in the P2P network in this embodiment, as shown in FIG. 4, includes the following steps:
步驟 401 : 节点 1感知节点 2过负荷后, 节点 1根据过负荷策略, 选择 向节点 3发送业务请求消息;  Step 401: After the node 1 senses that the node 2 is overloaded, the node 1 selects to send a service request message to the node 3 according to the overload policy;
这里, 节点 1可通过现有技术感知节点 2过负荷; 节点 1可通过 DHT 算法, 获得节点 3 , 进而据此向节点 3发送业务请求消息; 可以依据需要设置所述过负荷策略, 所述过负荷策略可以包括: 过负 荷的阀门值、 满负荷的阀门值等; 比如: 可以设置过负荷的阀门值为 90% , 满负荷的阀门值为 96%, 等等; Here, the node 1 can be aware that the node 2 is overloaded by the prior art; the node 1 can obtain the node 3 through the DHT algorithm, and then send a service request message to the node 3 according to the data; The overload strategy may be set according to requirements, and the overload strategy may include: an overloaded valve value, a full-load valve value, etc.; for example: a valve value that can be set to an overload is 90%, and a full-load valve value is 96%, etc.;
所述业务请求消息包含: 用户身份标识或资源 ID;  The service request message includes: a user identity or a resource ID;
本步驟中,还可以是节点 1未感知到节点 2过负荷, 当节点 1向节点 发送业务请求消息后, 节点 2因过负荷将所述业务请求消息转发给节点 3。  In this step, the node 1 does not sense that the node 2 is overloaded. After the node 1 sends a service request message to the node, the node 2 forwards the service request message to the node 3 due to overload.
步驟 402: 节点 3收到业务请求消息后, 向节点 2发送代理征求请求消 这里, 所述代理征求请求消息包含: 用户身份标识或资源 ID。  Step 402: After receiving the service request message, the node 3 sends a proxy solicitation request to the node 2, where the proxy solicitation request message includes: a user identity identifier or a resource ID.
步驟 403: 节点 2收到代理征求请求消息, 如果允许节点 3代理业务, 则执行步驟 404, 否则, 执行步驟 407;  Step 403: Node 2 receives the agent solicitation request message, if the node 3 is allowed to proxy the service, step 404 is performed, otherwise, step 407 is performed;
这里, 节点 2依据需要, 确定是否允许节点 3代理业务, 举个例子来 说, 节点 2过负荷后, 节点 2的另一个备份节点代理过某个用户的业务, 当节点 3收到的业务请求信息仍为该用户的业务时, 节点 2可以不允许节 点 3代理业务, 仍由节点 2的另一个备份节点代理该用户的业务。  Here, the node 2 determines whether to allow the node 3 to proxy the service according to the need. For example, after the node 2 is overloaded, another backup node of the node 2 proxies the service of a certain user, and the service request received by the node 3 When the information is still the service of the user, node 2 may not allow node 3 to proxy the service, and still another node of node 2 proxy the service of the user.
步驟 404: 节点 2在所述用户身份标识或资源 ID对应的数据区中设置 Semi-Active标识, 之后向节点 3返回应答消息;  Step 404: The node 2 sets a Semi-Active identifier in the data area corresponding to the user identity or the resource ID, and then returns a response message to the node 3;
这里, 所述 Semi- Active标识可以包含: 节点 3的地址信息, 比如: 节 点 3的节点 ( Node )标识 ID信息; 所述 Semi-Active标识用于标识该用户 的业务已由备份节点代理处理;  Here, the Semi-Active identifier may include: address information of the node 3, such as: Node (Node) identification ID information of the node 3; the Semi-Active identifier is used to identify that the service of the user has been processed by the backup node agent;
节点 2可以将设置的 Semi-Active标识同步到自身的所有备份节点。 步驟 405: 节点 3收到应答消息后, 代替节点 2处理业务, 并在处理完 成后向节点 1返回业务请求应答消息, 之后执行步驟 406;  Node 2 can synchronize the set Semi-Active ID to all of its own backup nodes. Step 405: After receiving the response message, the node 3 processes the service instead of the node 2, and returns a service request response message to the node 1 after the processing is completed, and then proceeds to step 406;
这里, 如果节点 1发送的业务请求涉及到数据修改, 则需要执行步驟 402-404, 并在节点 3收到节点 2的应答消息后, 代理节点 2处理业务, 或 者, 节点 3可以依据与节点 2之间的协议, 直接代理节点 2处理业务; 如 果节点 1发送的业务请求仅涉及读操作业务,节点 3可以不需要征求节点 2 的同意, 即: 不执行步驟 402~404, 直接代理节点 2处理业务; 其中, 所述 协议可以依据需要进行设置。 Here, if the service request sent by the node 1 involves data modification, steps 402-404 need to be performed, and after the node 3 receives the response message of the node 2, the proxy node 2 processes the service, or The node 3 can directly process the service by the proxy node 2 according to the protocol with the node 2; if the service request sent by the node 1 only involves the read operation service, the node 3 can not request the consent of the node 2, that is, the step is not executed. 402~404, the direct proxy node 2 processes the service; wherein the protocol can be set according to requirements.
步驟 406:当节点 2过负荷状态取消后,节点 3与节点 2进行数据同步, 节点 3将代理节点 2处理业务时产生的变更数据同步给节点 2,结束当前处 理流程;  Step 406: After the node 2 overload state is canceled, the node 3 performs data synchronization with the node 2, and the node 3 synchronizes the change data generated when the proxy node 2 processes the service to the node 2, and ends the current processing flow;
这里, 当节点 2过负荷状态取消后, 可以通知节点 3 , 节点 3收到通知 后, 与节点 2进行数据同步; 或者, 节点 2在过负荷状态取消后, 判断自 身是否存在 Semi-Active标识的用户数据,如果存在,则向节点 3获取数据, 从而实现数据同步; 或者, 节点 2可以根据 Semi-Active标识中的节点 3的 地址信息, 直接向节点 3获取数据, 从而实现数据同步; 或者, 节点 3定 时查询节点 2的过负荷状态, 发现节点 2过负荷状态取消后, 向节点 2同 步数据; 其中, 节点 3可以通过定时向节点 2发送消息的方式查询节点 2 的过负荷状态是否取消, 或者, 可以定时向过负荷服务器查询节点 2的过 负荷状态是否取消。  Here, after the node 2 overload state is canceled, the node 3 may be notified, and after receiving the notification, the node 3 performs data synchronization with the node 2; or, after the node 2 cancels the overload state, it determines whether the Semi-Active identifier exists. User data, if present, acquires data from the node 3, thereby implementing data synchronization; or, the node 2 can directly acquire data from the node 3 according to the address information of the node 3 in the Semi-Active identifier, thereby implementing data synchronization; or The node 3 periodically queries the overload state of the node 2, and finds that the node 2 synchronizes the data to the node 2 after the overload state is canceled. The node 3 can query whether the overload state of the node 2 is canceled by periodically sending a message to the node 2. Alternatively, the overload server may be periodically queried whether the overload status of the node 2 is canceled.
步驟 407: 节点 2向节点 3返回拒绝消息。  Step 407: Node 2 returns a reject message to node 3.
步驟 408: 节点 3收到拒绝消息后, 向节点 1返回拒绝消息, 之后结束 当前处理流程。  Step 408: After receiving the reject message, the node 3 returns a reject message to the node 1, and then ends the current processing flow.
实施例二:  Embodiment 2:
本实施例的应用场景为: 节点 1为发送消息的节点, 节点 2为接收消 息的节点, 且满负荷, 节点 3为节点 2的备份节点, 这里, 所述满负荷是 指节点 2的负荷达到满负荷预设的阀门值, 本实施例 P2P网络中控制过负 荷的方法, 如图 5所示, 包括以下步驟:  The application scenario of this embodiment is: Node 1 is a node that sends a message, Node 2 is a node that receives a message, and is fully loaded, and node 3 is a backup node of node 2. Here, the full load means that the load of node 2 is reached. The preset threshold value of the valve, the method for controlling the overload in the P2P network in this embodiment, as shown in FIG. 5, includes the following steps:
步驟 501 : 节点 1感知节点 2满负荷后, 节点 1根据过负荷策略, 选择 向节点 3发送业务请求消息; Step 501: After node 1 senses that node 2 is fully loaded, node 1 selects according to the overload policy. Sending a service request message to the node 3;
这里, 节点 1可通过现有技术感知节点 2过负荷; 节点 1可通过 DHT 算法, 获得节点 3, 进而据此向节点 3发送业务请求消息;  Here, the node 1 can be aware that the node 2 is overloaded by the prior art; the node 1 can obtain the node 3 through the DHT algorithm, and then send a service request message to the node 3 according to the data;
可以依据需要设置所述过负荷策略, 所述过负荷策略可以包括: 过负 荷的阀门值、 满负荷的阀门值等; 比如: 可以设置过负荷的阀门值为 90%, 满负荷的阀门值为 96%, 等等;  The overload strategy may be set according to requirements, and the overload strategy may include: an overloaded valve value, a full-load valve value, etc.; for example: a valve value that can be set to be overloaded is 90%, and a full-load valve value is 96%, etc.;
所述业务请求消息包含: 用户身份标识或资源 ID;  The service request message includes: a user identity or a resource ID;
本步驟中,还可以是节点 1未感知到节点 2满负荷, 当节点 1向节点 发送业务请求消息后, 节点 2因过负荷将所述业务请求消息转发给节点 3。  In this step, the node 1 does not perceive that the node 2 is fully loaded. After the node 1 sends a service request message to the node, the node 2 forwards the service request message to the node 3 due to overload.
步驟 502: 节点 3收到业务请求消息后, 向节点 2发送代理征求请求消 息, 并启动定时器;  Step 502: After receiving the service request message, the node 3 sends a proxy solicitation request message to the node 2, and starts a timer.
这里, 所述代理征求请求消息包含: 用户身份标识或资源 ID;  Here, the proxy solicitation request message includes: a user identity identifier or a resource ID;
所述定时器的时长依据需要进行设置, 比如: Is等。  The duration of the timer is set according to requirements, such as: Is, etc.
步驟 503: 定时器超时且未收到节点 2的应答消息后, 为所述用户身份 表示或资源 ID对应的数据区中设置 Non-SYN标识, 之后代理节点 2处理 业务,并在处理完成后向节点 1返回业务请求应答消息,之后执行步驟 504; 这里, 当定时器超时后且未收到节点 2的应答消息时, 节点 3可以重 复多次向节点 2发送确认消息, 如果仍未收到节点 2的确认消息, 则代理 节点 2处理业务; 其中, 发送确认消息的次数可以依据需要进行设置, 比 如: 3次;  Step 503: After the timer expires and the response message of the node 2 is not received, the Non-SYN identifier is set in the data area corresponding to the user identity representation or the resource ID, and then the proxy node 2 processes the service, and after the processing is completed, The node 1 returns a service request response message, and then performs step 504. Here, when the timer expires and the response message of the node 2 is not received, the node 3 may repeatedly send an acknowledgement message to the node 2 multiple times, if the node is still not received. 2, the confirmation message, the proxy node 2 processes the service; wherein, the number of times the confirmation message is sent can be set according to needs, for example: 3 times;
当定时器超时且未收到节点 2的应答消息时, 节点 3会认为节点 2为 满负荷状态;  When the timer expires and the response message of node 2 is not received, node 3 considers node 2 to be in a full load state;
所述 Non-SYN标识用于表明该用户的数据未进行同步;所述 Non-SYN 标识可以包含节点 3的地址信息, 比如: 节点 3的 Node ID信息;  The Non-SYN identifier is used to indicate that the data of the user is not synchronized; the Non-SYN identifier may include address information of the node 3, for example: Node ID information of the node 3;
如果节点 1发送的业务请求涉及到数据修改, 则需要执行步驟 502, 并 在将所述用户身份表示或资源 ID对应的数据区中设置 Non-SYN标识后, 代理节点 2处理业务, 或者, 节点 3可以依据与节点 2之间的协议, 直接 代理节点 2处理业务; 如果节点 1发送的业务请求仅涉及读操作业务, 节 点 3可以不向节点 2发送代理征求请求消息, 直接代理节点 2处理业务; 其中, 所述协议可以依据需要进行设置。 If the service request sent by the node 1 involves data modification, step 502 is performed, and After setting the Non-SYN identifier in the data area corresponding to the user identity representation or the resource ID, the proxy node 2 processes the service, or the node 3 can directly process the node 2 according to the protocol with the node 2; The service request sent by the node 1 only involves the read operation service, and the node 3 may not send the agent solicitation request message to the node 2, and the direct proxy node 2 processes the service; wherein the protocol may be set as needed.
步驟 504:当节点 2满负荷状态取消后,节点 3与节点 2进行数据同步, 将代理节点 2处理业务时产生的变更数据同步给节点 2,结束当前处理流程; 这里, 当节点 2满负荷状态取消后, 认为自身维护的所有数据已经不 可信任, 可以为自身维护的所有数据设置 Non-Tmst标识, 之后向节点 3获 取变更数据, 从而实现数据同步; 或者, 节点 2满负荷状态取消后, 向节 点 3 查询数据状态消息, 节点 3 收到查询数据状态消息后, 将自身具有 Non-SYN标识的所有用户数据列表发送给节点 2, 节点 2收到列表后, 为 自身所述用户数据列表中的用户数据区设置 Semi- Active标识, 之后通知节 点 3满负荷状态取消; 节点 3收到通知后, 与节点 2进行数据同步; 其中, Semi-Active标识用于标识该用户的业务已由备份节点代理处理。  Step 504: After the node 2 full load state is canceled, the node 3 performs data synchronization with the node 2, synchronizes the change data generated when the proxy node 2 processes the service to the node 2, and ends the current processing flow; where, when the node 2 is fully loaded After canceling, all the data that it maintains is considered untrustworthy. You can set the Non-Tmst identifier for all the data it maintains, and then obtain the change data from the node 3 to achieve data synchronization. Or, after the node 2 is fully loaded, the The node 3 queries the data status message, and after receiving the query data status message, the node 3 sends all the user data lists with the Non-SYN identifier to the node 2, and after receiving the list, the node 2 is in the user data list. The user data area is set to the Semi-Active identity, and then the node 3 is notified that the full load state is canceled. After receiving the notification, the node 3 performs data synchronization with the node 2; wherein, the Semi-Active identifier is used to identify that the user's service has been represented by the backup node. deal with.
实施例三:  Embodiment 3:
本实施例的应用场景为: 节点 1为发送消息的节点, 节点 2为接收消 息的节点, 且过负荷, 节点 3及节点 4为节点 2的备份节点, 且节点 3也 过负荷, 这里, 所述过负荷是指节点 2及节点 3的负荷达到过负荷预设的 阀门值, 本实施例 P2P网络中控制过负荷的方法, 如图 6所示, 包括以下 步驟:  The application scenario of this embodiment is: node 1 is a node that sends a message, node 2 is a node that receives a message, and is overloaded, node 3 and node 4 are backup nodes of node 2, and node 3 is also overloaded, here, The method of controlling the overload in the P2P network in this embodiment, as shown in FIG. 6, includes the following steps:
步驟 601: 节点 1感知节点 2过负荷后, 节点 1根据过负荷策略, 选择 向节点 3发送业务请求消息;  Step 601: After the node 1 senses that the node 2 is overloaded, the node 1 selects to send a service request message to the node 3 according to the overload policy;
这里, 节点 1可通过现有技术感知节点 2过负荷; 节点 1可通过 DHT 算法, 获得节点 3, 进而据此向节点 3发送业务请求消息; 可以依据需要设置所述过负荷策略, 所述过负荷策略可以包括: 过负 荷的阀门值、 满负荷的阀门值等; 比如: 可以设置过负荷的阀门值为 90%, 满负荷的阀门值为 96%, 等等; Here, the node 1 can be aware that the node 2 is overloaded by the prior art; the node 1 can obtain the node 3 through the DHT algorithm, and then send a service request message to the node 3 according to the data; The overload strategy may be set according to requirements, and the overload strategy may include: an overloaded valve value, a full-load valve value, etc.; for example: a valve value that can be set to be overloaded is 90%, and a full-load valve value is 96%, etc.;
所述业务请求消息包含: 用户身份标识或资源 ID;  The service request message includes: a user identity or a resource ID;
本步驟中,还可以是节点 1未感知到节点 2过负荷, 当节点 1向节点 发送业务请求消息后, 节点 2因过负荷将所述业务请求消息转发给节点 3。  In this step, the node 1 does not sense that the node 2 is overloaded. After the node 1 sends a service request message to the node, the node 2 forwards the service request message to the node 3 due to overload.
步驟 602: 节点 3收到业务请求消息后, 发现自身过负荷, 将收到的业 务请求消息转发给节点 4;  Step 602: After receiving the service request message, the node 3 finds that it is overloaded, and forwards the received service request message to the node 4;
这里, 节点 3可通过 DHT算法, 获得节点 4, 进而据此向节点 4转发 业务请求消息;  Here, the node 3 can obtain the node 4 through the DHT algorithm, and then forward the service request message to the node 4 according to this;
所述业务请求消息包含: 用户身份标识或资源 ID。  The service request message includes: a user identity or a resource ID.
步驟 603: 节点 4收到业务请求消息后, 向节点 2发送代理征求请求消 这里, 节点 4还可以向节点 3发送代理征求请求消息, 节点 3收到消 息后, 将消息转发给节点 2;  Step 603: After receiving the service request message, the node 4 sends a proxy solicitation request to the node 2, where the node 4 can also send a proxy solicitation request message to the node 3, and after receiving the message, the node 3 forwards the message to the node 2;
所述代理征求请求消息包含: 用户身份标识或资源 ID。  The agent solicitation request message includes: a user identity or a resource ID.
步驟 604: 节点 2收到代理征求请求消息, 如果允许节点 4代理业务, 则执行步驟 605, 否则, 执行步驟 608;  Step 604: Node 2 receives the proxy solicitation request message, if the node 4 is allowed to proxy the service, step 605 is performed, otherwise, step 608 is performed;
这里, 节点 2依据需要, 确定是否允许节点 4代理业务, 举个例子来 说, 节点 2过负荷后, 节点 2的另一个备份节点代理过某个用户的业务, 当节点 4收到的业务请求信息仍为该用户的业务时, 节点 2可以不允许节 点 4代理业务, 仍由节点 2的另一个备份节点代理该用户的业务。  Here, the node 2 determines whether to allow the node 4 to proxy the service according to the need. For example, after the node 2 is overloaded, another backup node of the node 2 proxies the service of a certain user, and the service request received by the node 4 When the information is still the service of the user, node 2 may not allow node 4 to proxy the service, and still another node of node 2 shall proxy the user's service.
步驟 605: 节点 在所述用户身份标识或资源 ID对应的数据区中设置 Semi-Active标识, 之后向节点 4返回应答消息;  Step 605: The node sets a Semi-Active identifier in the data area corresponding to the user identity or the resource ID, and then returns a response message to the node 4;
这里, 节点 2还可以向节点 3返回应答消息, 节点 3收到消息后, 向 节点 4转发应答消息; Here, the node 2 can also return a response message to the node 3, and after receiving the message, the node 3 Node 4 forwards the response message;
所述 Semi- Active标识可以包含: 节点 4的地址信息, 比如: 节点 4的 Node ID信息; 所述 Semi-Active标识用于标识该用户的业务已由备份节点 代理处理;  The Semi-Active identifier may include: address information of the node 4, for example: Node ID information of the node 4; the Semi-Active identifier is used to identify that the service of the user has been processed by the backup node proxy;
节点 2可以将设置的 Semi-Active标识同步到自身的所有备份节点。 步驟 606: 节点 4收到应答消息后, 代替节点 2处理业务, 并在处理完 成后向节点 1返回业务请求应答消息, 之后执行步驟 607;  Node 2 can synchronize the set Semi-Active ID to all of its own backup nodes. Step 606: After receiving the response message, the node 4 processes the service instead of the node 2, and returns a service request response message to the node 1 after the processing is completed, and then proceeds to step 607;
这里, 如果节点 1发送的业务请求涉及到数据修改, 则需要执行步驟 603-605 , 并在节点 4收到节点 2的应答消息后, 代理节点 2处理业务, 或 者, 节点 4可以依据与节点 2之间的协议, 直接代理节点 2处理业务; 如 果节点 1发送的业务请求仅涉及读操作业务,节点 4可以不需要征求节点 2 的同意, 即: 不执行步驟 603~605 , 直接代理节点 2处理业务; 其中, 所述 协议可以依据需要进行设置。  Here, if the service request sent by the node 1 involves data modification, step 603-605 needs to be performed, and after the node 4 receives the response message of the node 2, the proxy node 2 processes the service, or the node 4 can cooperate with the node 2 Between the agreement, the direct proxy node 2 processes the service; if the service request sent by the node 1 only involves the read operation service, the node 4 may not require the consent of the node 2, that is, the steps 603 to 605 are not executed, and the direct proxy node 2 processes Service; wherein the protocol can be set as needed.
步驟 607:当节点 2过负荷状态取消后,节点 4与节点 2进行数据同步, 节点 4将代理节点 2处理业务时产生的变更数据同步给节点 2,结束当前处 理流程;  Step 607: After the node 2 overload state is canceled, the node 4 performs data synchronization with the node 2, and the node 4 synchronizes the change data generated when the proxy node 2 processes the service to the node 2, and ends the current processing flow;
这里, 当节点 2过负荷状态取消后, 可以通知节点 4, 节点 4收到通知 后, 与节点 2进行数据同步; 或者, 节点 2在过负荷状态取消后, 判断自 身是否存在 Semi-Active标识的用户数据,如果存在,则向节点 4获取数据, 从而实现数据同步; 或者, 节点 2可以根据 Semi-Active标识中的节点 4的 地址信息, 直接向节点 4获取数据, 从而实现数据同步; 或者, 节点 4定 时查询节点 2的过负荷状态, 发现节点 2过负荷状态取消后, 向节点 2同 步数据; 其中, 节点 4可以通过定时向节点 发送消息的方式查询节点 的过负荷状态是否取消, 或者, 可以定时向过负荷服务器查询节点 2的过 负荷状态是否取消。 步驟 608: 节点 2向节点 4返回拒绝消息。 Here, after the node 2 overload state is canceled, the node 4 can be notified, and after receiving the notification, the node 4 performs data synchronization with the node 2; or, after the node 2 cancels the overload state, it determines whether the semi-active identifier exists. User data, if present, acquires data from the node 4, thereby implementing data synchronization; or, the node 2 can directly obtain data from the node 4 according to the address information of the node 4 in the Semi-Active identifier, thereby implementing data synchronization; or The node 4 periodically queries the overload state of the node 2, and finds that the node 2 synchronizes the data to the node 2 after canceling the overload state; wherein, the node 4 can query whether the overload state of the node is canceled by periodically sending a message to the node, or The overload server can be periodically queried whether the overload status of node 2 is canceled. Step 608: Node 2 returns a reject message to node 4.
步驟 609: 节点 4收到拒绝消息后, 向节点 1返回拒绝消息, 之后结束 当前处理流程。  Step 609: After receiving the reject message, the node 4 returns a reject message to the node 1, and then ends the current processing flow.
实施例四:  Embodiment 4:
本实施例的应用场景为: 节点 1为发送消息的节点, 节点 2为接收消 息的节点, 且过负荷, 节点 3为节点 2的第一备份节点, 即: 当节点 2过 负荷时首选的备份节点, 节点 2的所有备份节点均过负荷, 这里, 所述过 负荷是指节点的负荷达到过负荷预设的阀门值, 本实施例 P2P网络中控制 过负荷的方法, 如图 7所示, 包括以下步驟:  The application scenario of this embodiment is as follows: Node 1 is a node that sends a message, Node 2 is a node that receives a message, and is overloaded, and node 3 is a first backup node of node 2, that is, a preferred backup when node 2 is overloaded. All the backup nodes of the node 2 are overloaded. Here, the overload refers to the preset threshold value of the load of the node. The method for controlling the overload in the P2P network in this embodiment is as shown in FIG. 7 . Includes the following steps:
步驟 701 : 节点 1感知节点 2过负荷后, 节点 1根据过负荷策略, 选择 向节点 3发送业务请求消息;  Step 701: After the node 1 senses that the node 2 is overloaded, the node 1 selects to send a service request message to the node 3 according to the overload policy;
这里, 节点 1可通过现有技术感知节点 2过负荷; 节点 1可通过 DHT 算法, 获得节点 3, 进而据此向节点 3发送业务请求消息;  Here, the node 1 can be aware that the node 2 is overloaded by the prior art; the node 1 can obtain the node 3 through the DHT algorithm, and then send a service request message to the node 3 according to the data;
可以依据需要设置所述过负荷策略, 所述过负荷策略可以包括: 过负 荷的阀门值、 满负荷的阀门值等; 比如: 可以设置过负荷的阀门值为 90%, 满负荷的阀门值为 96%, 等等;  The overload strategy may be set according to requirements, and the overload strategy may include: an overloaded valve value, a full-load valve value, etc.; for example: a valve value that can be set to be overloaded is 90%, and a full-load valve value is 96%, etc.;
所述业务请求消息包含: 用户身份标识或资源 ID;  The service request message includes: a user identity or a resource ID;
本步驟中,还可以是节点 1未感知到节点 2过负荷, 当节点 1向节点 发送业务请求消息后, 节点 2因过负荷将所述业务请求消息转发给节点 3。  In this step, the node 1 does not sense that the node 2 is overloaded. After the node 1 sends a service request message to the node, the node 2 forwards the service request message to the node 3 due to overload.
步驟 702: 节点 3收到业务请求消息后, 感知节点 2的所有备份节点均 过负荷, 通知节点 1;  Step 702: After receiving the service request message, the node 3 senses that all the backup nodes of the node 2 are overloaded, and notifies the node 1;
这里, 节点 3可采用现有技术感知节点 2的所有备份节点均过载。 步驟 703: 节点 1收到通知后, 依据过负荷策略, 按比例丟弃或发送消 这里, 节点 1按比例丟弃或发送消息的具体处理过程可采用现有的处 理过程。 Here, the node 3 can use the prior art to sense that all backup nodes of the node 2 are overloaded. Step 703: After receiving the notification, the node 1 discards or sends the data according to the overload policy. The specific processing procedure for the node 1 to discard or send the message proportionally may be used. Process.
实施例五:  Embodiment 5:
本实施例的应用场景为: 当新节点加入 P2P网络时, 原负责节点过负 荷, 且原负责节点采用实施例一、 实施例二、 以及实施例三中的控制过负 荷的方式, 已由原负责节点的备份节点代理原负责节点处理业务, 本实施 例实现数据迁移的方法, 如图 8所示, 包括以下步驟:  The application scenario of this embodiment is as follows: When a new node joins the P2P network, the original responsible node is overloaded, and the original responsible node adopts the control overload method in the first embodiment, the second embodiment, and the third embodiment. The backup node agent responsible for the node is responsible for the node processing service. The method for implementing data migration in this embodiment, as shown in FIG. 8, includes the following steps:
步驟 801 : 新加入节点向原负责节点发送加入请求消息, 获取应负责的 数据。  Step 801: The newly added node sends a join request message to the original responsible node to obtain the data to be responsible.
步驟 802: 原负责节点收到请求消息后, 根据 P2P网络算法, 将新加入 节点应负责的数据迁移给新加入节点;  Step 802: After receiving the request message, the original responsible node migrates the data that the newly added node is responsible for to the newly added node according to the P2P network algorithm.
这里, 所述根据 P2P网络算法, 将新加入节点应负责的数据迁移给新 加入节点的具体处理过程与现有的处理过程完全相同, 这里不再赘述。  Here, according to the P2P network algorithm, the specific processing process of migrating the data that the newly added node is responsible for to the newly added node is exactly the same as the existing processing, and details are not described herein again.
步驟 803: 新加入节点收到迁移数据, 并发现迁移数据中存在部分设置 有 Semi- Active或 Non-Trust标识后, 向原负责节点的备份节点获取代理时 产生的变更数据;  Step 803: The newly joined node receives the migration data, and finds that the change data generated when the agent obtains the proxy from the backup node of the original responsible node after the Semi-Active or Non-Trust identifier is partially set in the migration data;
这里, 当新加入节点发现移数据中存在部分设置有 Semi-Active 或 Non-Trust标识时,则认为当前设置有 Semi-Active或 Non-Tmst标识的数据 为不完整数据, 需要从原负责节点的备份节点获取代理时产生的变更数据; 新加入节点可以依据标识中携带的地址信息, 向原负责节点的备份节 点获取代理时产生的变更数据; 或者, 可以根据 DHT算法, 获得原负责节 点的备份节点, 据此向原负责节点的备份节点获取代理时产生的变更数据。  Here, when the new joining node finds that the existing part of the mobile data is set with the Semi-Active or Non-Trust identifier, it is considered that the data currently set with the Semi-Active or Non-Tmst identifier is incomplete data, and needs to be from the original responsible node. The change data generated by the backup node when acquiring the proxy; the newly added node may obtain the change data generated by the proxy from the backup node of the original responsible node according to the address information carried in the identifier; or, may obtain the backup node of the original responsible node according to the DHT algorithm. According to this, the change data generated when the proxy is obtained from the backup node of the original responsible node.
步驟 804:原负责节点的备份节点向新加入节点迁移代理原负责节点处 理业务时产生的变更数据。  Step 804: The backup node of the original responsible node migrates the change data generated when the agent is responsible for processing the service to the newly joined node.
基于上述 P2P网络中控制过负荷的方法, 本发明还提供了一种 P2P网 络中控制过负荷的系统, 如图 9所示, 该系统包括: 第一节点 91、 以及第 二节点 92; 其中, Based on the method for controlling overload in the P2P network, the present invention further provides a system for controlling overload in a P2P network. As shown in FIG. 9, the system includes: a first node 91, and a Two nodes 92; wherein
第一节点 91 , 用于接收消息的节点过负荷后,接收第二节点 91发送的 消息;  The first node 91, after the node for receiving the message is overloaded, receives the message sent by the second node 91;
第二节点 92, 用于感知所述接收消息的节点过负荷后, 直接向第一节 点 91发送消息。  The second node 92, after sensing that the node receiving the message is overloaded, directly sends a message to the first node 91.
这里, 需要说明的是: 第一节点 91为接收消息的节点的备份节点; 第 二节点 92为发送消息的节点。  Here, it should be noted that the first node 91 is a backup node of a node that receives a message; the second node 92 is a node that transmits a message.
其中, 所述第一节点 91 , 还用于收到第二节点 92发送的消息后, 代理 所述接收消息的节点处理业务, 并在处理完成后, 向第二节点 92返回业务 请求应答消息;  The first node 91 is further configured to: after receiving the message sent by the second node 92, proxy the node receiving the message to process the service, and return the service request response message to the second node 92 after the processing is completed;
所述第二节点 92, 还用于接收第一节点 91返回的业务请求应答消息。 该系统还可以进一步包括: 第三节点 93 , 用于收到第一节点 91发送的 代理征求请求消息后, 为第一节点 91即将代理的数据设置不完整性标识, 之后向第一节点 91返回应答消息;  The second node 92 is further configured to receive a service request response message returned by the first node 91. The system may further include: a third node 93, configured to: after receiving the proxy solicitation request message sent by the first node 91, set an incompleteness identifier for the data to be proxied by the first node 91, and then return to the first node 91 Reply message
在代理第三节点 93处理业务之前, 所述第一节点 91 ,还用于向第三节 点 93发送代理征求请求消息, 并在收到第三节点 93返回的应答消息后, 代理第三节点 93处理业务; 或者,  Before the proxy third node 93 processes the service, the first node 91 is further configured to send a proxy solicitation request message to the third node 93, and after receiving the response message returned by the third node 93, proxy the third node 93. Processing business; or,
在代理第三节点 93处理业务之前, 所述第一节点 91 ,还用于向第三节 点 93发送代理征求请求消息, 并在定时器超时, 且未收到第三节点 93返 回的任何消息后, 为即将代理的数据设置 Non-SYN, 并代理第三节点 93 处理业务;  Before the proxy third node 93 processes the service, the first node 91 is further configured to send a proxy solicitation request message to the third node 93, and after the timer expires, and no message returned by the third node 93 is received, , setting Non-SYN for the data to be proxied, and proxying the third node 93 to process the service;
这里, 需要说明的是: 第三节点 93是指接收消息的节点, 第一节点 91 为第三节点 93的备份节点。  Here, it should be noted that the third node 93 refers to a node that receives a message, and the first node 91 is a backup node of the third node 93.
在第三节点 93过负荷后, 所述第三节点 93 ,还用于将收到的第二节点 92发送的消息转发给第一节点 91 ;  After the third node 93 is overloaded, the third node 93 is further configured to forward the received message sent by the second node 92 to the first node 91;
第二节点 92, 还用于向第三节点 93发送消息。 所述第三节点 93 ,还用于过负荷状态取消后, 与第一节点 91进行数据 同步; The second node 92 is further configured to send a message to the third node 93. The third node 93 is further configured to perform data synchronization with the first node 91 after the overload state is canceled;
所述第一节点 91 ,还用于第三节点 93过负荷状态取消后, 与第三节点 93进行数据同步。  The first node 91 is further configured to perform data synchronization with the third node 93 after the third node 93 cancels the overload state.
所述第一节点 91 ,还用于收到第二节点 92发送的消息后, 且感知第三 节点 93的所有备份节点均过负荷时, 通知第二节点 92;  The first node 91 is further configured to notify the second node 92 after receiving the message sent by the second node 92 and sensing that all the backup nodes of the third node 93 are overloaded;
所述第二节点 92,还用于收到第一节点 91的通知后,依据过负荷策略, 按比例丟弃或发送消息。  The second node 92 is further configured to: after receiving the notification of the first node 91, discard or send the message proportionally according to the overload policy.
这里, 本发明的所述系统中的第一节点、 及第三节点的具体处理过程 已在上文中详述, 不再赘述。  Here, the specific processing procedure of the first node and the third node in the system of the present invention has been described in detail above and will not be described again.
基于上述 P2P网络节点过负荷过程中数据迁移的方法, 本发明还提供 了一种 P2P网络节点过负荷过程中数据迁移的系统, 该系统包括: 第四节 点、 第五节点、 以及第六节点; 其中,  The present invention further provides a system for data migration in a process of overloading a P2P network node based on the method for data migration in a P2P network node overload process, the system comprising: a fourth node, a fifth node, and a sixth node; among them,
第四节点, 用于加入对等网络时, 向第五节点发送加入请求消息, 并 在收到第五节点迁移的迁移数据, 且确定收到的迁移数据中存在部分用户 的数据不完整后, 向第六节点获取所述部分用户的数据;  The fourth node, when used to join the peer-to-peer network, sends a join request message to the fifth node, and after receiving the migrated data migrated by the fifth node, and determining that the data of some users in the received migration data is incomplete, Obtaining data of the part of the user from the sixth node;
所述第五节点, 还用于收到第四节点发送的加入请求消息后, 将第四 节点应负责的数据迁移给第四节点;  The fifth node is further configured to: after receiving the join request message sent by the fourth node, migrate the data that the fourth node should be responsible to to the fourth node;
所述第六节点, 用于向第四节点提供所述部分用户的数据。  The sixth node is configured to provide data of the part of the user to the fourth node.
这里, 需要说明的是: 第五节点过负荷, 第六节点为第五节点的备份 节点  Here, it should be noted that: the fifth node is overloaded, and the sixth node is the backup node of the fifth node.
其中, 所述部分用户的数据包括所述第六节点代理时产生的变更数据。 这里, 本发明的所述 P2P 网络节点过负荷过程中数据迁移的系统中的 第四节点、 及第六节点的具体处理过程已在上文中详述, 不再赘述。  The data of the part of the user includes the change data generated when the sixth node agent is used. Here, the specific processing procedure of the fourth node and the sixth node in the system for data migration in the overload process of the P2P network node of the present invention has been detailed in the above, and will not be described again.
以上所述, 仅为本发明的较佳实施例而已, 并非用于限定本发明的保 护范围。  The above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention.

Claims

权利要求书 Claim
1、 一种对等网络中控制过负荷的方法, 其特征在于, 该方法包括: 接收消息的节点过负荷后, 所述接收消息的节点的备份节点接收发送 消息的节点发送的消息。  A method for controlling overload in a peer-to-peer network, the method comprising: after a node receiving a message is overloaded, the backup node of the node receiving the message receives a message sent by a node that sends the message.
2、 根据权利要求 1所述的方法, 其特征在于, 该方法进一步包括: 所述发送消息的节点感知所述接收消息的节点过负荷后, 直接向所述 接收消息的节点的备份节点发送消息; 或者,  The method according to claim 1, wherein the method further comprises: the node that sends the message, after the node that receives the message is overloaded, directly sends a message to the backup node of the node that receives the message. Or,
所述接收消息的节点过负荷后, 将所述发送消息的节点发送的消息转 发给所述备份节点。  After the node receiving the message is overloaded, the message sent by the node that sends the message is forwarded to the backup node.
3、根据权利要求 1或 2所述的方法,其特征在于,该方法进一步包括: 所述备份节点收到消息后, 代理所述接收消息的节点处理业务, 并在 处理完成后, 向所述发送消息的节点返回业务请求应答消息。  The method according to claim 1 or 2, wherein the method further comprises: after receiving the message, the backup node is configured to process the service by the node receiving the message, and after the processing is completed, to the The node that sent the message returns a service request response message.
4、 根据权利要求 3所述的方法, 其特征在于, 在代理所述接收消息的 节点处理业务之前, 该方法进一步包括:  The method according to claim 3, wherein before the proxying the node receiving the message to process the service, the method further comprises:
所述备份节点向所述接收消息的节点发送代理征求请求消息, 并在收 到所述代理征求请求消息应答消息后, 代理所述接收消息的节点处理业务; 或者,  And the backup node sends a proxy solicitation request message to the node that receives the message, and after receiving the proxy solicitation request message response message, proxying the node receiving the message to process the service; or
所述备份节点向所述接收消息的节点发送代理征求请求消息; 在定时器超时, 且未收到所述接收消息的节点返回的任何消息后, 所 述备份节点为即将代理的用户数据设置未同步标识, 之后代理所述接收消 息的节点处理业务。  The backup node sends a proxy solicitation request message to the node that receives the message; after the timer expires, and the message returned by the node receiving the message is not received, the backup node sets the user data to be proxied. Synchronizing the identity, and then proxying the node receiving the message to process the service.
5、 根据权利要求 4所述的方法, 其特征在于, 在收到所述代理征求请 求消息应答消息之前, 该方法进一步包括:  The method according to claim 4, wherein, before receiving the agent solicitation request message response message, the method further comprises:
所述接收消息的节点收到代理征求请求消息, 且允许所述备份节点代 理处理业务后, 所述接收消息的节点为所述备份节点即将代理的用户数据 设置不完整性标识, 之后向所述备份节点返回应答消息。 After the node receiving the message receives the agent solicitation request message, and allows the backup node agent to process the service, the node receiving the message is the user data to be proxied by the backup node. The incompleteness identifier is set, and then a response message is returned to the backup node.
6、 根据权利要求 5所述的方法, 其特征在于, 所述不完整性标标识包 含所述备份节点的地址信息;  The method according to claim 5, wherein the incompleteness identifier includes address information of the backup node;
在为所述备份节点即将代理的用户数据设置不完整性标识后, 该方法 进一步包括:  After the integrity identifier is set for the user data to be proxied by the backup node, the method further includes:
所述接收消息的节点将所述不完整性标识同步到所述接收消息的节点 的所有备份节点。  The node receiving the message synchronizes the incompleteness identifier to all backup nodes of the node receiving the message.
7、 根据权利要求 1或 2所述的方法, 其特征在于, 当所述接收消息的 节点过负荷状态取消后, 该方法进一步包括:  The method according to claim 1 or 2, wherein, when the node receiving the message is overloaded, the method further comprises:
所述接收消息的节点与所述备份节点进行数据同步。  The node receiving the message performs data synchronization with the backup node.
8、 根据权利要求 7所述的方法, 其特征在于, 所述与所述备份节点进 行数据同步, 为:  8. The method according to claim 7, wherein the data synchronization with the backup node is:
所述备份节点将代理所述接收消息的节点处理业务时产生的变更数据 同步给所述接收消息的节点。  The backup node synchronizes the change data generated when the node receiving the message processes the service to the node receiving the message.
9、根据权利要求 1或 2所述的方法,其特征在于,该方法进一步包括: 所述备份节点收到消息, 且感知所述接收消息的节点的所有备份节点 均过负荷时, 通知所述发送消息的节点;  The method according to claim 1 or 2, further comprising: the backup node receiving the message, and notifying that all backup nodes of the node receiving the message are overloaded, The node that sent the message;
所述发送消息的节点收到通知后, 依据过负荷策略, 按比例丟弃或发 送消息。  After receiving the notification, the node that sends the message discards or sends the message proportionally according to the overload policy.
10、 根据权利要求 6所述的方法, 其特征在于, 该方法进一步包括: 所述接收消息的节点过负荷, 且所述接收消息的节点或所述接收消息 的节点的其它备份节点再次收到所述发送消息的节点发送的消息后, 将所 述消息转发至对应的用户数据区中标记的地址。  10. The method according to claim 6, wherein the method further comprises: the node receiving the message is overloaded, and the node receiving the message or another backup node of the node receiving the message receives again After the message sent by the node sending the message, the message is forwarded to the address marked in the corresponding user data area.
11、 一种对等网络节点过负荷过程中数据迁移的方法, 其特征在于, 该方法包括: 新加入节点向负责节点发送加入请求消息; 11. A method for data migration in a process of overloading a peer-to-peer network node, the method comprising: The new joining node sends a join request message to the responsible node;
所述负责节点将新加入节点应负责的数据迁移给所述新加入节点; 所述新加入节点收到迁移数据, 且确定收到的迁移数据中存在部分用 户的数据不完整后, 向所述负责节点的备份节点获取所述部分用户的数据。  The responsible node migrates the data that the newly added node is responsible for to the newly joined node; after the new joining node receives the migration data, and determines that the data of some users in the received migration data is incomplete, the The backup node responsible for the node acquires data of the part of the user.
12、 根据权利要求 11所述的方法, 其特征在于, 所述确定收到的迁移 数据中存在部分用户的数据不完整, 为:  The method according to claim 11, wherein the determining that the data of the part of the user in the received migration data is incomplete is:
所述新加入节点根据用户的数据中的不完整性标识, 确定所述用户的 数据不完整。  The newly joining node determines that the data of the user is incomplete according to the incompleteness identifier in the data of the user.
13、 根据权利要求 12所述的方法, 其特征在于, 所述不完整性标识包 含所述备份节点的地址信息;  The method according to claim 12, wherein the incompleteness identifier includes address information of the backup node;
所述向所述负责节点的备份节点获取所述部分用户的数据, 为: 所述新加入节点根据所述备份节点的地址信息 , 向所述备份节点获取 所述部分用户的数据。  And obtaining, by the backup node of the responsible node, the data of the part of the user, where: the newly joining node acquires data of the part of the user from the backup node according to the address information of the backup node.
14、 根据权利要求 11至 13任一项所述的方法, 其特征在于, 所述部 分用户的数据包括所述备份节点代理时产生的变更数据。  The method according to any one of claims 11 to 13, wherein the data of the part of the user includes change data generated when the backup node is agent.
15、 一种对等网络中控制过负荷的系统, 其特征在于, 该系统包括: 第一节点, 为接收消息的节点的备份节点, 用于接收消息的节点过负荷后, 接收发送消息的节点发送的消息。  A system for controlling overload in a peer-to-peer network, the system comprising: a first node, a backup node of a node that receives a message, and a node that receives a message after the node that receives the message is overloaded The message sent.
16、 根据权利要求 15所述的系统, 其特征在于, 第一节点, 还用于收 到第二节点发送的消息后, 代理所述接收消息的节点处理业务, 并在处理 完成后, 向第二节点返回业务请求应答消息;  The system according to claim 15, wherein the first node is further configured to: after receiving the message sent by the second node, proxy the node that receives the message to process the service, and after the processing is completed, go to the The two nodes return a service request response message;
该系统进一步包括: 第二节点, 用于接收第二节点返回的业务请求应 答消息。  The system further includes: a second node, configured to receive a service request response message returned by the second node.
17、 根据权利要求 16所述的系统, 其特征在于, 该系统进一步包括: 第三节点, 用于收到第一节点发送的代理征求请求消息后, 为第一节点即 将代理的数据设置不完整性标识, 之后向第一节点返回应答消息; 在代理第三节点处理业务之前, 所述第一节点, 还用于向第三节点发 送代理征求请求消息, 并在收到第三节点返回的应答消息后, 代理第三节 点处理业务; 或者, The system according to claim 16, wherein the system further comprises: a third node, configured to receive, after receiving the proxy solicitation request message sent by the first node, the first node Setting the data of the proxy to the integrity identifier, and then returning the response message to the first node; before the proxy third node processes the service, the first node is further configured to send the proxy solicitation request message to the third node, and receive the message After the response message returned by the third node, the proxy third node processes the service; or
在代理第三节点处理业务之前, 所述第一节点, 还用于向第三节点发 送代理征求请求消息, 并在定时器超时, 且未收到第三节点返回的任何消 息后, 为即将代理的数据设置未同步标识, 并代理第三节点处理业务。  Before the third node processes the service, the first node is further configured to send a proxy solicitation request message to the third node, and after the timer expires, and the message returned by the third node is not received, The data settings are not synchronized, and the third node is acting on the business.
18、 根据权利要求 17所述的系统, 其特征在于,  18. The system of claim 17 wherein:
所述第三节点, 用于过负荷后, 将收到的第二节点发送的消息转发给 第一节点;  The third node, after being used for overloading, forwards the received message sent by the second node to the first node;
所述第二节点, 还用于向第三节点发送消息; 或者,  The second node is further configured to send a message to the third node; or
所述第二节点, 还用于感知第三节点过负荷后, 直接向第一节点发送 消息。  The second node is further configured to: after sensing that the third node is overloaded, directly send a message to the first node.
19、 根据权利要求 17所述的系统, 其特征在于,  19. The system of claim 17 wherein:
所述第三节点, 还用于过负荷状态取消后, 与第一节点进行数据同步; 所述第一节点, 还用于第三节点过负荷状态取消后, 与第三节点进行 数据同步。  The third node is further configured to perform data synchronization with the first node after the overload state is canceled; and the first node is further configured to perform data synchronization with the third node after the third node overload state is canceled.
20、 根据权利要求 16至 19任一项所述的系统, 其特征在于, 所述第一节点, 还用于收到第二节点发送的消息后, 且感知第三节点 的所有备份节点均过负荷时, 通知第二节点;  The system according to any one of claims 16 to 19, wherein the first node is further configured to: after receiving the message sent by the second node, and perceive all backup nodes of the third node to pass When the load is being loaded, the second node is notified;
所述第二节点, 还用于收到第一节点的通知后, 依据过负荷策略, 按 比例丟弃或发送消息。  The second node is further configured to: after receiving the notification of the first node, discard or send the message according to the overload policy.
21、 一种对等网络节点过负荷过程中数据迁移的系统, 其特征在于, 该系统包括: 第四节点、 第五节点、 以及第六节点; 其中,  A system for data migration in a process of overloading a peer-to-peer network node, the system comprising: a fourth node, a fifth node, and a sixth node;
第四节点, 用于加入对等网络时, 向第五节点发送加入请求消息, 并 在收到第五节点迁移的迁移数据, 且确定收到的迁移数据中存在部分用户 的数据不完整后, 向第六节点获取所述部分用户的数据; The fourth node, when used to join the peer-to-peer network, sends a join request message to the fifth node, and After receiving the migration data migrated by the fifth node, and determining that the data of the part of the user in the received migration data is incomplete, obtaining the data of the part of the user from the sixth node;
所述第五节点, 还用于收到第四节点发送的加入请求消息后, 将第四 节点应负责的数据迁移给第四节点;  The fifth node is further configured to: after receiving the join request message sent by the fourth node, migrate the data that the fourth node should be responsible to to the fourth node;
所述第六节点, 用于向第四节点提供所述部分用户的数据。  The sixth node is configured to provide data of the part of the user to the fourth node.
22、 根据权利要求 21所述的系统, 其特征在于, 所述部分用户的数据 包括所述第六节点代理时产生的变更数据。  22. The system according to claim 21, wherein the data of the part of the user includes change data generated when the sixth node agent.
PCT/CN2012/072273 2011-04-08 2012-03-13 Method and system for controlling overload in peer-to-peer network WO2012136094A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110087745.2 2011-04-08
CN201110087745.2A CN102739711B (en) 2011-04-08 2011-04-08 The method and system of overload are controlled in a kind of peer-to-peer network

Publications (1)

Publication Number Publication Date
WO2012136094A1 true WO2012136094A1 (en) 2012-10-11

Family

ID=46968582

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/072273 WO2012136094A1 (en) 2011-04-08 2012-03-13 Method and system for controlling overload in peer-to-peer network

Country Status (2)

Country Link
CN (2) CN102739711B (en)
WO (1) WO2012136094A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103036928A (en) * 2011-10-10 2013-04-10 中兴通讯股份有限公司 Network overload processing method and network overload processing device
CN110658779A (en) * 2019-10-09 2020-01-07 翼石电子股份有限公司 PLC data storage method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399765A (en) * 2007-09-28 2009-04-01 华为技术有限公司 Method and system for reducing hot node load in P2P network

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3973548B2 (en) * 2002-12-10 2007-09-12 株式会社ソニー・コンピュータエンタテインメント Network system, network connection establishment method, network terminal, computer program, and recording medium storing program
EP1713233A1 (en) * 2005-04-14 2006-10-18 Alcatel Interconnection of domains in a peer to peer network
CN101242251A (en) * 2007-02-07 2008-08-13 华为技术有限公司 Method and device for improving P2P overlapped network stability
CN101296108B (en) * 2007-04-27 2012-12-12 华为技术有限公司 Method, network appliance and system for resource backup in structured P2P
CN101399746B (en) * 2007-09-26 2011-03-16 华为技术有限公司 Packet routing method, system, device and method, system for selecting backup resource
CN101729277B (en) * 2008-10-27 2015-07-08 华为技术有限公司 Method for managing equipment pool, node equipment and communication system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399765A (en) * 2007-09-28 2009-04-01 华为技术有限公司 Method and system for reducing hot node load in P2P network

Also Published As

Publication number Publication date
CN106850730A (en) 2017-06-13
CN102739711A (en) 2012-10-17
CN102739711B (en) 2017-10-17

Similar Documents

Publication Publication Date Title
EP2705645B1 (en) Name-based neighbor discovery and multi-hop service discovery in information-centric networks
JP5847191B2 (en) Intermediate node for content sharing, content request terminal, and content sharing method thereof
US7978631B1 (en) Method and apparatus for encoding and mapping of virtual addresses for clusters
US20120077483A1 (en) Enabling interface aggregation of mobile broadband network interfaces
WO2012048613A1 (en) Centralized p2p system that supports nat traversal and nat traversal method
WO2013040970A1 (en) Relay node selecting method and device
US20200220800A1 (en) Data Distribution Method and Distribution Server
WO2013143360A1 (en) Method for downloading service data and mobile terminal
US9350652B2 (en) Method, system and router for changing application in BGP session
WO2009000181A1 (en) Method for acquiring traversal resource, peer to peer node and peer to peer system
CN104660550A (en) Method for performing session migration among plurality of servers
CN102857536B (en) The method and system of data backup and migration are realized in peer-to-peer network
WO2012167659A1 (en) Data communication method and device in constrained application protocol
CN102624759B (en) A kind of method and node for realizing Data Migration in session
WO2012136094A1 (en) Method and system for controlling overload in peer-to-peer network
WO2013053252A1 (en) Method and apparatus for processing network overload
JP4800916B2 (en) Data relay device
JP3682439B2 (en) Data communication system and method, server device, client device, and program
WO2012167710A1 (en) Service backup method and system in network with heterogeneous nodes
KR102090493B1 (en) Device and method of HTTP Proxy to reduce the HTTP protocol transmission delay and the HTTP processing load in Mobile Communication Networks
EP2790362B1 (en) Network load control method and registration server
WO2012129794A1 (en) Communication method, network node and network super node in a peer-to-peer (p2p) network
WO2012048576A1 (en) Method, server and system for controlling p2p (peer-to-peer) download
CN102739762B (en) The method and system of Data Migration during a kind of peer network node overload
US20230275962A1 (en) Data transmission method and communication apparatus

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

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

Country of ref document: EP

Kind code of ref document: A1