CN101378392A - Method and apparatus for searching resource in P2P circumstance - Google Patents
Method and apparatus for searching resource in P2P circumstance Download PDFInfo
- Publication number
- CN101378392A CN101378392A CNA2007101459024A CN200710145902A CN101378392A CN 101378392 A CN101378392 A CN 101378392A CN A2007101459024 A CNA2007101459024 A CN A2007101459024A CN 200710145902 A CN200710145902 A CN 200710145902A CN 101378392 A CN101378392 A CN 101378392A
- Authority
- CN
- China
- Prior art keywords
- resource
- client node
- node
- information
- local
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Computer And Data Communications (AREA)
Abstract
The invention discloses a resource inquiry method in P2P circumstances, which compromises the following steps: a local peer node receives the resource inquiry information of a first client node aiming at a second client node; according to the resource inquiry information, the local peer node inquires the resource information of the second client node in local area; and the local peer node responds the resource information of the second client node to the first client node. Through the embodiment, the local peer node inquires the resource information of the second client node in the local area firstly after receiving the resource inquiry information of the first client node aiming at the second client node, and the distributed inquiring process in the P2P overlay network is reduced in the local corresponding surroundings, thus increasing the efficiency of local resource inquiry.
Description
Technical field
The present invention relates to communication technical field, the method and apparatus of resource query under particularly a kind of P2P environment.
Background technology
Session initiation protocol (SIP, Session Initiation Protocol) is IETF (InternetEngineering Task Force, the Internet engineering duty group) work out, be used for multimedia communication in many ways, its exploitation purpose is with helping provide the senior telephone service of crossing over the internet.SIP is used for initiation session, it can control the foundation and the termination of the Multimedia session of being participated in by a plurality of participants, and can dynamically adjust and revise session attribute, as session bandwidth require, the code/decode format of the medium type (voice, video and data etc.) of transmission, medium, to the support of multicast and clean culture etc.SIP is a text based application layer control protocol, be independent of bottom host-host protocol TCP/UDP, be used for setting up, revise and stop IP (InternetProtocol, Internet protocol) online both sides or Multimedia session in many ways, support voice, video, data, E-mail, state, IM (Instant messaging, instant messaging), chat, recreation etc.
Now a large amount of VoIP (Voice over IP, ip voice communication) systems adopts the SIP framework based on C/S (Client/Server, client/server) pattern of ietf definition, and the terminal use is called SIP UA (UserAgent, user agent).Each SIP UA has unique name under the SIP system, be URI (UniformResource Identifier, the unified resource identifier), be the URI of user Alice as " sip:alice@atlanta.com ", this URI does not change with the variation of the physical location of UA in network.The physical location of UA in network is by its contact address, shows as the IP address, and for example, the contact address of user Alice can be an IP address " 192.0.2.4 ".
Under traditional SIP framework, usually the VoIP terminal use is before use SIP carries out communication, each SIPUA is with oneself URI and the mapping of the contact method SIP registrar server (as the step among Fig. 1 and Fig. 2 1.) that is registered to the territory, place, if succeed in registration, SIP registrar server will send the message that succeeds in registration, for example: 200 OK, give SIP UA (as the step among Fig. 1 and Fig. 2 2.).After registration is finished, if the VoIP terminal use wishes to carry out communication with appointment called, it can send a sip invite message at called URI, this sip invite message at first can be sent to the sip proxy server (as the step among Fig. 1 and Fig. 2 3.) in territory, caller place, this sip proxy server is by DNS (Domain NameSystem, domain name system) domain-name information of resolving called URI is learnt the position of the sip proxy server in territory, called place, then this sip invite message is sent to this sip proxy server (as the step among Fig. 1 and Fig. 2 4.), the sip proxy server in territory, last called place can send to called URI (as the step among Fig. 1 and Fig. 2 5.) with this sip invite message by the contact address corresponding with this URI of called registration.
Traditional SIP system is made up of SIP UA and sip server, this sip server is SIP registrar server at SIP UA during to the mapping of own URI of this sip server registration and contact method, is sip proxy server to this sip server transmission at caller SIPUA during at the sip invite message of the URI of called SIP UA.SIP UA and sip server constitute the C/S relation in this system, the C/S model system that makes is easy to management, but poor expandability, dispose the cost height, and have serious single point failure risk, therefore the P2P network architecture is considered widely to combine with SIP and is provided VoIP to serve now.P2P (Peer to Peer, peer-to-peer network) is based upon on the Internet architecture, each node of system has identical status in network, cooperation forms virtual subnet mutually, the branch that does not have the server and client side in the system, solve server bottleneck problem in the existing network effectively, can utilize the resource of network fully.Key technology in the peer-to-peer network is the location of how to realize distributed objects, two mechanism of main at present employing: inundation mechanism (flooding) and distributed hashtable (Distributed Hash Table, DHT) mechanism, its basic ideas are that application system is passed through SHA (Secure Hash Algorithm, SHA) access resources is mapped to certain identifier space (GUID), at given resource identifier (Resource-ID) afterwards, the node that system utilizes distributed query agreement query object to be depended on conducts interviews to resource again.It is the present situation at center that this location mechanism has changed in the existing network with the server, makes exchange data between any two main frames, shares information, is with good expansibility and load balance.P2P is called as P2PSIP (Peer-to-Peer Session Initiation Protocol, peering session initializtion protocol) with combining of SIP.
Only there are two category nodes in the current P2P use P2P Client/Peer (client node/peer node) of system framework, P2P peer node and P2P client node in this framework.Peer node participates in making up the P2P overlapping network, and the P2P overlapping network is the network that is positioned at application layer.The difference of P2P client node and P2P peer node only is that the P2P peer node participates in making up the distributed transmission service that the P2P overlapping network provides storage of distribution of resource formula and data, the P2P client node does not then participate in making up the P2P overlapping network, but obtains the service of P2P overlapping network by the P2P peer node.Correspondingly, also there are two category nodes in the P2PSIP framework, P2PSIP peer node and P2PSIP client node, this two category node and traditional SIP framework do not have corresponding relation, all can support the function of SIP UA simultaneously.
Under the P2PSIP framework, the VoIP terminal use is before use SIP carries out communication, each SIP UA is registered to the P2PSIP peer node (as the step among Fig. 3 and Fig. 4 1.) that service is provided for it with the URI of oneself and the mapping of contact method, this P2PSIP peer node can be used hash algorithm (hashing algorithm) to handle to this URI and obtain a Resource-ID (resource identifier), this P2PSIP peer node will be published to this map information on the P2PSIP peer node that has on whole overlapping network with the immediate Peer-ID of this Resource-ID (as the step among Fig. 3 and Fig. 4 2.) then, the Peer-ID here is the sign of P2PSIP peer node in the P2PSIP overlapping network, it and Resource-ID are in same numerical space, and the two can directly compare.Peer-ID can use identical hash algorithm that the contact address such as the IP address of P2PSIP peer node are carried out obtaining behind the Hash, also can distribute to this P2PSIP peer node when the P2PSIP peer node joins the P2PSIP overlapping network by a concentrated server.The P2PSIP peer node that receives this map information can be to reply (as the step among Fig. 3 and Fig. 4 3.) of store for resource distribution formula of P2PSIP peer node feedback of this SIP UA service successfully, is that P2PSIP peer node that this SIP UA serves can be informed this SIP UA succeed in registration (as the step among Fig. 3 and Fig. 4 4.) then.
After registration is finished, if the P2PSIP client node wishes to carry out communication with the Su Duan of the communication of appointment, it can send a P2PSIP resource inquiry information at the place end URI of communication, and this P2PSIP resource inquiry information at first can be sent to the P2PSIP peer node (as the step among Fig. 3 and Fig. 4 5.) that service is provided for the source end of communication.This P2PSIP peer node is at first used the hash algorithm of appointment to handle based on URI and is obtained Resource-ID, this query messages is sent to have the node (as the step among Fig. 3 and Fig. 4 6.) of promptly being responsible for the corresponding resource information of storage with the P2PSIP peer node of the immediate Peer-ID of this Resource-ID in this overlapping network on the overlapping network then.After resource inquiry information arrives purpose P2PSIP peer node, the P2PSIP peer node (as the step among Fig. 3 and Fig. 4 7.) that service is provided to the source end for communication is replied in the URI of the Su Duan of communication and the mapping of contact address, this P2PSIP peer node can be replied the result source end (as the step among Fig. 3 and Fig. 4 8.) to communication, and the source end of communication uses the contact address of the Su Duan of communication directly to send a sip invite message to initiate voip conversation (as the step among Fig. 3 and Fig. 4 9.) to the place of communication end then.
Under current P2P framework, because the resource that a plurality of P2P client nodes that resource distribution formula memory mechanism causes same P2P peer node to be served are issued is stored in P2P peer node different on the P2P overlapping network, this just makes the P2P client node must remove to carry out on the P2P overlapping network distributed query when inquiry provides the resource that other P2P client node of service issued by same P2P peer node, this distributed query usually needs a plurality of P2P peer node collaborative process just can obtain the result, and this resource query mechanism is suitable poor efficiency under the scene of local communication.Here " local communication " is meant the Su Duan of the source end of communication and communication all in this locality, and the Su Duan of the source end of communication and communication provides the service of P2P overlapping network by same P2P peer node.
The shortcoming of prior art is when the Su Duan of the source of communication end and communication provides the service of P2P overlapping network by same P2P peer node, the source end of communication also must carry out the resource information that distributed query just can obtain the Su Duan of communication from the P2P overlapping network, and the search efficiency of local resource is low.
Summary of the invention
The embodiment of the invention provides the method and apparatus of resource query under a kind of P2P environment, solves in the prior art when the Su Duan of the source of communication end and communication provides service by same P2P peer node the shortcoming that the local resource search efficiency is low.
For achieving the above object, the embodiment of the invention provides the method for resource query under a kind of P2P environment on the one hand, may further comprise the steps: local peer node receives the resource inquiry information of first client node at second client node; Local peer node is according to the resource information of described resource inquiry information at described second client node of local search; Local peer node replys the resource information of described second client node to described first client node.
On the other hand, the embodiment of the invention also proposes a kind of local peer node, comprises resource memory module, message sink module, resource query module and information answer module, and described resource memory module is used to store the resource information of client node; Described message sink module is used to receive the resource inquiry information of first client node at second client node; Described resource query module is used for according to the resource information of described resource inquiry information at described second client node of local search; Described information answer module is used for the resource information of described second client node is replied to described first client node.
Compared with prior art, the embodiment of the invention has the following advantages: the embodiment of the invention is after receiving the resource inquiry information of first client node at second client node, this locality peer node elder generation is in the resource information of this second client node of local search, if find, then the resource information of this second client node is replied to first client node, the process that this has just reduced distributed query on the P2P overlapping network has improved the efficient of local resource inquiry.
Description of drawings
Fig. 1 is resource registering and a sip invite message route processing schematic diagram under the prior art SIP framework;
Fig. 2 is resource registering and a sip invite message route process chart under the prior art SIP framework;
Fig. 3 is resource registering and a sip invite message route processing schematic diagram under the prior art P2P-SIP framework;
Fig. 4 is resource registering and a sip invite message route process chart under the prior art P2P-SIP framework;
Fig. 5 is the structure chart of the local peer node of the embodiment of the invention;
Fig. 6 is the flow chart of the method for resource query under the embodiment of the invention P2P environment;
Fig. 7 is the flow chart of the method embodiment one of resource query under the P2P environment of the present invention;
Fig. 8 is the flow chart of the method embodiment two of resource query under the P2P environment of the present invention;
Fig. 9 is the flow chart of the method embodiment three of resource query under the P2P environment of the present invention;
Figure 10 is the flow chart of the method embodiment four of resource query under the P2P environment of the present invention.
Embodiment
The embodiment of the invention provides the method for resource query under a kind of P2P environment, in embodiments of the present invention, and according to the give out information resource information of on local peer node storage client node of the resource of client node.After receiving the resource inquiry information of first client node at second client node, elder generation is in the resource information of this second client node of local search, if find the resource information of this second client node, then the resource information of this second client node is replied to first client node.The embodiment of the invention has been reduced the process of distributed query on the P2P overlapping network under the scene of local communication, improved the search efficiency of local resource.Here " local communication " is meant that first client node and second client node provide the service of P2P overlapping network by same local peer node, if first client node and second client node are not to provide the service of P2P overlapping network by same local peer node, but first client node and second client node are in same local area network (LAN), and first client node often carries out communication with second client node, then the communication of this first client node and second client node also belongs to the category of " local communication ", so the resource information of this second client node also can be stored in to first client node and provides on the peer node of P2P overlapping network service.In addition, the resource information of client node can send the mode that resource gives out information by client node and be stored on the local peer node, also can be by user's manual configuration on this this locality peer node.
The resource information of mentioning in the embodiment of the invention under P2P Client/Peer framework, is the unified resource identifiers, URIs of client node and the map information of contact address; Under the P2PSIP framework, can be the unified resource identifiers, URIs of SIP client node and the map information of contact address, also can be based on the resource identifier Resource-ID of the URI generation of SIP client node.This Resource-ID is handled the URI use hash algorithm (hashing algorithm) of SIP client node by the P2PSIP peer node to obtain, first client node is after the Resource-ID that has obtained second client node, just can obtain the contact address of second client node corresponding with this Resource-ID, at this moment, first client node just can for example send a sip invite message to initiate the ip voice session to second client node in the IP address by the contact address of second client node.
As shown in Figure 5, the structure chart for the local peer node of the embodiment of the invention comprises resource memory module 1, message sink module 2, resource query module 3 and information answer module 4.Resource memory module 1, the resource that is used for receiving the client node that submodule 11 the receives resource information of this client node of storage that gives out information according to giving out information.Receive after resource that submodule 11 receives this client node gives out information giving out information, resource memory module 1 judges whether to store this client node according to local policy earlier on this this locality peer node resource information, if judgement can be stored this client node on this this locality peer node resource information, the then resource information of resource memory module 1 this client node of storage.If judge the resource information cannot on this this locality peer node, store this client node, then resource memory module 1 with the resource information distributed store of this client node to the P2P overlapping network.The resource information that no matter whether can store this client node on this this locality peer node, this this locality peer node all can be followed the resource information of processing rule this client node of distributed storage on the P2P overlapping network of current P2P Client/Peer framework.This resource information under the P2PSIP framework, can be the unified resource identifiers, URIs of SIP client node and the map information of contact address, also can be based on the resource identifier Resource-ID of the URI generation of SIP client node.The local policy here refers to the memory space state and the usage policy of local peer node, for example under the situation that local peer node memory space allows, the resource information of this client node is stored on this this locality peer node; If local peer node memory space anxiety, then on this this locality peer node, do not store the resource information of this client node, but with the resource information distributed store of this client node to the P2P overlapping network, at this moment on one or more peer node of P2P overlapping network, all may store the resource information of this client node.This usage policy refers to the service regeulations of memory space, such as the size that limits memory space with under the situation that memory space exhausts, how to insert new information, for example discharge memory space by the resource information of deleting those recently minimum accessed local caches.Message sink module 2 is used to receive the resource inquiry information of first client node at second client node.Under the P2PSIP framework, this resource inquiry information comprises the unified resource identifiers, URIs of second client node.
Wherein, resource memory module 1 also comprises give out information reception submodule 11 and local sub module stored 13, give out information and receive the resource that submodule 11 is used to receive client node and give out information, under the P2PSIP framework, unified resource identifiers, URIs and for example mapping of IP address of contact method that this resource gives out information and comprises the SIP client node.Local sub module stored 13 is used to store give out information and receives the resource information of the described client node that submodule 11 receives.
Wherein, preferably, resource memory module 1 comprises that also storage judges submodule 12, is used for receiving after resource that submodule 11 receives client node gives out information the resource information that judges whether to store this client node according to local policy on local peer node giving out information.If storage is judged submodule 12 and judged the resource information that can store this client node on this this locality peer node, then notify the resource information of local sub module stored 13 these client nodes of storage.If storage judges submodule 12 and judges the resource information that cannot store this client node on this this locality peer node, then distribution of notifications sub module stored 14 with the resource information distributed store of this client node to the P2P overlapping network.The resource information that no matter whether can store this client node on this this locality peer node, distributed store submodule 14 all can be followed the resource information of processing rule this client node of distributed storage on the P2P overlapping network of current P2P Client/Peer framework.The local policy here refers to the memory space state and the usage policy of local peer node, under situation about allowing at local peer node memory space, the resource information of this client node is stored on this this locality peer node; If local peer node memory space anxiety, then the resource information of this client node cannot be stored on this this locality peer node, but with the resource information distributed store of this client node to the P2P overlapping network, at this moment on one or more peer node of P2P overlapping network, all may store this client node resource information.This usage policy refers to the service regeulations of memory space, such as the size that limits memory space with under the situation that memory space exhausts, how to insert new information, for example discharge memory space by the resource information of deleting those recently minimum accessed local caches.
Wherein, resource memory module 1 also comprises local sub module stored 13, be used for judging that in storage submodule 12 judges can store the resource information of client node on local peer node the time that the resource information that the resource that receives the client node of submodule 11 receptions according to giving out information gives out information this client node is stored on this this locality peer node.
Wherein, resource memory module 1 also comprises distributed store submodule 14, be used for after storage judges that submodule 12 judgements cannot be stored the resource information of client node on local peer node, the resource that receives the client node that submodule 11 receives according to giving out information gives out information resource information distributed store with this client node to the P2P overlapping network, at this moment all may store the resource information of this client node on one or more peer node of P2P overlapping network.The resource information that simultaneously no matter whether can store this client node on this this locality peer node, distributed store submodule 14 all can be followed the resource information of processing rule this client node of distributed storage on the P2P overlapping network of current P2PClient/Peer framework.
Wherein, resource query module 3 also comprises inquiry judging submodule 31, be used for after message sink module 2 receives the resource inquiry information of first client node at second client node, judge whether this second client node is the client node that this this locality peer node is served.If inquiry judging submodule 31 judges that these second client nodes are client nodes that this this locality peer node is served, then notify resource inquiry information that local search submodule 32 receives according to message sink module 2 resource information at this second client node of local search.If inquiry judging submodule 31 judges that this second client node is not the client node that this this locality peer node is served, then distribution of notifications is inquired about the resource information of submodule 33 this second client node of distributed query on the P2P overlapping network.
Wherein, resource query module 3 also comprises local search submodule 32, be used for after inquiry judging submodule 31 judges that these second client nodes are this this locality peer node client node of being served, the resource inquiry information that receives according to message sink module 2 is in the resource information of this second client node of local search.
Wherein, resource query module 3 also comprises the inquiry submodule 33 that distributes, be used for after inquiry judging submodule 31 judges that these second client nodes are not this this locality peer node client node of being served, first client node that receives according to message sink module 2 is at the resource information of resource inquiry information described second client node of distributed query on the P2P overlapping network of second client node.
As shown in Figure 6, the flow chart for the method for resource query under the embodiment of the invention P2P environment specifically may further comprise the steps:
Step S601, local peer node is according to the give out information resource information of this client node of storage of the resource of client node.This resource gives out information, and under the P2PSIP framework, comprises the unified resource identifiers, URIs and for example mapping of IP address of contact method of SIP client node.Receive after resource that this client node sends gives out information this this locality peer node judges whether to store this client node according to local policy earlier on this this locality peer node resource information in local peer node.If judge the resource information can on this this locality peer node, store this client node, the resource information of then should this locality peer node storing this client node.If judge the resource information cannot on this this locality peer node, store this client node, then should this locality peer node with the resource information distributed store of this client node to the P2P overlapping network.The resource information that no matter whether can store this client node on this this locality peer node, this this locality peer node all can be followed the resource information of processing rule this client node of distributed storage on the P2P overlapping network of current P2P Client/Peer framework.This resource information under the P2PSIP framework, can be the unified resource identifiers, URIs of SIP client node and the map information of contact address, also can be based on the resource identifier Resource-ID of the URI generation of SIP client node.The local policy here refers to the memory space state and the usage policy of local peer node, under situation about allowing at local peer node memory space, the resource information of this client node can be stored on this this locality peer node; If local peer node memory space anxiety, then cannot on this this locality peer node, store the resource information of this client node, but with the resource information distributed store of this client node to the P2P overlapping network, at this moment on one or more peer node of P2P overlapping network, all may store the resource information of this client node.This usage policy refers to the service regeulations of memory space, such as the size that limits memory space with under the situation that memory space exhausts, how to insert new information, for example discharge memory space by the resource information of deleting those recently minimum accessed local caches.
Step S602, local peer node receives the resource inquiry information of first client node at second client node.When first client node wants to set up session with second client node, first client node can send a resource inquiry information that comprises the resource identifier of second client node, and this resource inquiry information is received by the local peer node that is the service of first client node.
Step S603, local peer node is inquired about the resource information of second client node on this this locality peer node.After local peer node receives the resource inquiry information of first client node at second client node, this this locality peer node judges whether this second client node is the client node that this this locality peer node is served earlier, if judging this second client node is the client node that this this locality peer node is served, then should this locality the peer node resource information of on this this locality peer node, inquiring about this second client node according to the resource inquiry information that receives.If judging this second client node is not the client node that this this locality peer node is served, then should this locality peer node will be according to the resource information of the resource inquiry information that receives this second client node of distributed query on the P2P overlapping network.
Step S604, local peer node replys the resource information of second client node to first client node.After local peer node inquired the resource information of second client node, this this locality peer node replied the resource information of this second client node to first client node.At this moment, under the P2PSIP framework, the contact address that first client node just can use the resource information of this second client node to carry for example directly sends a sip invite message to initiate the ip voice session to second client node in the IP address.
The embodiment of the invention provides the method for resource query under a kind of P2P environment, pass through the embodiment of the invention, local peer node is according to the give out information resource information of on this this locality peer node this client node of storage of the resource of client node, when first client node and second client node provide service by same local peer node, after receiving the resource inquiry information of first client node at second client node, this this locality peer node is the resource information of this second client node of inquiry on this this locality peer node earlier, if find, then the resource information of this second client node is replied to this first client node.The process that this has just reduced local peer node distributed query on the P2P overlapping network has improved the search efficiency of local resource.
Also in conjunction with the accompanying drawings the present invention is described in further detail below by specific embodiment:
As shown in Figure 7, be the flow chart of the method embodiment one of resource query under the P2P environment of the present invention, local peer node is after the resource that receives client node gives out information, and the flow process of storing the resource information of this client node specifically may further comprise the steps:
Step S701, the resource that local peer node receives client node gives out information.If a client node is want to set up session with other client nodes, the service of using the P2P overlapping network to provide, then this client node can give out information to the local peer node transmission resource that service is provided for this client node.This resource gives out information, and under the P2PSIP framework, comprises the unified resource identifiers, URIs and for example mapping of IP address of contact method of SIP client node.
Step S702, local peer node judges whether and the resource information of client node can be stored on this this locality peer node.After the resource that local peer node receives this client node gives out information, the resource information that can judge whether on this this locality peer node, to store this client node according to local policy.The local policy here refers to the memory space state and the usage policy of local peer node, under situation about allowing at local peer node memory space, the resource information of this client node can be stored on this this locality peer node; If local peer node memory space anxiety, then cannot on this this locality peer node, store the resource information of this client node, but with the resource information distributed store of this client node to the P2P overlapping network, at this moment on one or more peer node of P2P overlapping network, all may store the resource information of this client node.This usage policy refers to the service regeulations of memory space, such as the size that limits memory space with under the situation that memory space exhausts, how to insert new information, for example discharge memory space by the resource information of deleting those recently minimum accessed local caches.This resource information under the P2PSIP framework, can be for example mapping of IP address of contact address of the unified resource identifiers, URIs and the SIP client node of SIP client node, also can be the resource identifier Resource-ID of SIP client node correspondence.
Step S703, local peer node is stored in the resource information of client node on this this locality peer node.Local peer node judged to store the resource information of this client node on this this locality peer node according to local policy after, local peer node was stored in the resource information of this client node on this this locality peer node.
Step S704, local peer node with the resource information distributed store of client node to the P2P overlapping network.The resource information that no matter whether can store this client node on this this locality peer node, this this locality peer node all can be followed the resource information of processing rule this client node of distributed storage on the P2P overlapping network of current P2P Client/Peer framework.At this moment on one or more peer node of P2P overlapping network, all may store the resource information of this client node.This resource information under the P2PSIP framework, can be for example mapping of IP address of contact address of the unified resource identifiers, URIs and the SIP client node of SIP client node, also can be the resource identifier Resource-ID of SIP client node correspondence.
Step S705, local peer node is handed down to client node with the stores processor result.After local peer node is finished the storage of the resource information of client node, the stores processor result to the resource information of this client node can be handed down to this client node.
The method of resource query under the above-mentioned P2P environment, on the basis of resource issue flow process under the prior art P2P environment, increased the step of local storage, the resource that local peer node receives this client node gives out information, after judgement can be stored in the resource information of this client node on this this locality peer node according to local policy, this this locality peer node was stored the resource information of this client node.This with regard to remedied local peer node in the prior art with the resource information distributed store of this client node to the P2P overlapping network and do not have the defective of backup on the local peer node.Like this, under the scene of local communication, just reduce the process of distributed query on the P2P overlapping network, improved the efficient of local resource inquiry.Here " local communication " is meant that first client node and second client node provide the service of P2P overlapping network by same local peer node.
As shown in Figure 8, flow chart for the method embodiment two of resource query under the P2P environment of the present invention, after local peer node received the resource inquiry information of first client node at second client node, the flow process of the resource information of inquiry second client node may further comprise the steps on local peer node:
Step S801, local peer node receives the resource inquiry information of first client node at second client node.When first client node wants to set up session with second client node, first client node can send a resource inquiry information that comprises the resource identifier of second client node, and this resource inquiry information is received by the local peer node that is the service of first client node.
Step S802, can local peer node judge the resource information that inquire second client node on this this locality peer node.After receiving the resource inquiry information of first client node at second client node, local peer node is inquired about second client node according to this resource inquiry information earlier on this this locality peer node resource information, if find, the resource information of second client node that then will inquire is replied to first client node; If on this this locality peer node, do not find the resource information of second client node, then the resource information of distributed query second client node on the P2P overlapping network.This resource information under the P2PSIP framework, can be for example mapping of IP address of contact address of the unified resource identifiers, URIs and the SIP client node of SIP client node, also can be the resource identifier Resource-ID of SIP client node correspondence.
Step S803, the resource information of local peer node distributed query second client node on the P2P overlapping network.After receiving the resource inquiry information of first client node at second client node, if local peer node does not inquire the resource information of second client node on this this locality peer node, then according to the resource information of resource inquiry information distributed query second client node on the P2P overlapping network of receiving.
Step S804, local peer node replys the resource information of second client node to first client node.After local peer node inquired the resource information of second client node, this this locality peer node replied the resource information of this second client node to first client node.At this moment, under the P2PSIP framework, the contact address that first client node just can use the resource information of this second client node to carry directly sends a sip invite message to initiate the ip voice session to second client node.
The method of resource query under the above-mentioned P2P environment, on the basis of the handling process of resource information inquiry under the prior art P2P environment, increased the step of local search, after local peer node receives the resource inquiry information of first client node at second client node, this this locality peer node is inquired about the resource information of this second client node earlier on this this locality peer node according to this resource inquiry information, if find, then the resource information of this second client node is replied to first client node, thereby reduced the process of distributed query on the P2P overlapping network, improved the efficient of local resource inquiry.
As shown in Figure 9, flow chart for the method embodiment three of resource query under the P2P environment of the present invention, after local peer node receives the resource inquiry information of first client node at second client node, this this locality peer node judges whether this second client node is the client node that this this locality peer node is served earlier, and then the resource information of on local peer node, inquiring about this second client node, this handling process specifically may further comprise the steps:
Step S901, local peer node receives the resource inquiry information of first client node at second client node.When first client node wants to set up session with second client node, first client node can send a resource inquiry information that comprises the resource identifier of second client node, and this resource inquiry information is received by the local peer node that is the service of first client node.
Step S902, local peer node judges whether this second client node is the client node that this this locality peer node is served.After receiving the resource inquiry information of first client node at second client node, local peer node judges whether this second client node is the client node that this this locality peer node is served earlier.This judgement can be judged according to the resource information of second client node, for example, under the P2PSIP framework, can judge according to the suffix of the unified resource identifiers, URIs of second client node, also can judge according to the resource identifier Resource-ID of second client node.After this this locality peer node judges that this second client node is this this locality peer node client node of being served, this this locality peer node is inquired about this second client node according to first client node that receives on this this locality peer node at the resource inquiry information of second client node resource information.
Step S903, can local peer node judge the resource information that inquire second client node on this this locality peer node.After local peer node judges that this second client node is this this locality peer node client node of being served, meeting is inquired about this second client node according to the resource inquiry information that receives on this this locality peer node resource information, if find, then the resource information of this second client node is replied to first client node.If local peer node is not found the resource information of this second client node on this this locality peer node, then on the P2P overlapping network, carry out distributed query.
Step S904, the resource information of local peer node distributed query second client node on the P2P overlapping network.If local peer node is not found the resource information of this second client node on this this locality peer node, then can on the P2P overlapping network, carry out distributed query, and the resource information of second client node that will find is replied to first client node.
Step S905, local peer node replys the resource information of second client node to first client node.After local peer node inquired the resource information of second client node, this this locality peer node replied the resource information of this second client node to first client node.At this moment, under the P2PSIP framework, the contact address that first client node just can use the resource information of this second client node to carry for example directly sends a sip invite message to initiate the ip voice session to second client node in the IP address.
The method of resource query under the above-mentioned P2P environment, on the basis of the handling process of resource information inquiry under the prior art P2P environment, not only increased the step of the resource information of inquiry second client node on local peer node, before carrying out local search, also increased and judged that whether second client node is the step of the same local peer node client node of serving, such handling process is more suitable for the scene that local peer node can be judged the access scope of second client node easily, for example, fixed access scenario.
As shown in figure 10, for the flow chart of the method embodiment four of resource query under the P2P environment of the present invention, under the P2PSIP framework, the route handling process of sip invite message specifically may further comprise the steps under SIP client node resource registering and the local traffic scene:
Step S1001, the resource that local peer node receives client node gives out information.Under the P2PSIP framework, unified resource identifiers, URIs and for example mapping of IP address of contact method that this resource gives out information and comprises the SIP client node.
Step S1002, local peer node according to resource give out information the storage client node resource information and with this resource information distributed store to the P2PSIP overlapping network.After the resource that receives this client node gives out information, this this locality peer node judges whether to store this client node according to local policy earlier on this this locality peer node resource information, if local peer node is judged the resource information that can store this client node on this this locality peer node, the resource information of then should this locality peer node storing this client node.Simultaneously, the resource information that no matter whether can on this this locality peer node, store this client node, this this locality peer node all can obtain a resource identifier Resource-ID according to the unified resource identifiers, URIs of client node, then should this locality peer node the resource information of this client node be published on the P2PSIP peer node that has on the P2PSIP overlapping network with the immediate peer identifier Peer-ID of this resource identifier Resource-ID, the resource information of this client node is carried out distributed storage on this overlapping network.The Peer-ID here is the sign of P2PSIP peer node in P2PSIP Overlay network, and it and Resource-ID are in same numerical space, and the two can directly compare.Peer-ID can carry out obtaining behind the Hash to the contact address such as the IP address of P2PSIP peer node by using identical hash algorithm, also can distribute to this P2PSIP peer node when the P2PSIP peer node joins the P2PSIPOverlay network by a concentrated server.At this moment on one or more peer node of P2PSIP overlapping network, all may store the resource information of this client node.This resource information can be the unified resource identifiers, URIs and for example mapping of IP address of contact address of this client node, also can be local peer node is passed through hash algorithm (hashing algorithm) generation of P2PSIP overlapping network agreement according to the unified resource identifiers, URIs of SIP client node resource identifier Resource-ID.
Step S1003, local peer node receives the response message of the distributed storage success that the peer node of the resource information of having stored this client node on the P2PSIP overlapping network sends.After this this locality peer node is published to the resource information of this client node on the P2PSIP peer node that has on the P2PSIP overlapping network with the immediate peer identifier Peer-ID of this resource identifier Resource-ID, the peer node that receives the resource information of this client node can send the response message of a distributed storage success to this this locality peer node, informs the resource information distributed storage success of this this locality this client node of peer node.
Step S1004, local peer node sends the successful response message of resource issue to client node.After local peer node receives the response message of the distributed storage success that the peer node of the resource information of having stored this client node sends, this this locality peer node can send a successful response message of resource issue to this client node, informs that this client node resource issues successfully.
Step S1005, local peer node receives the resource inquiry information of first client node at second client node.After the client node resource that this this locality peer node is served is issued successfully, if first client node of should this locality peer node being served is want to carry out communication with second client node, then this first client node can send a resource inquiry information that comprises the unified resource identifiers, URIs of second client node, and this resource inquiry information is received by this this locality peer node.
Step S1006, local peer node is inquired about the resource information of second client node on this this locality peer node according to resource inquiry information.After receiving the resource inquiry information of first client node at second client node, this this locality peer node is the resource information of this second client node of inquiry on this this locality peer node earlier, if can find the resource information of this second client node, then the resource information of this second client node is replied to first client node.If should this locality peer node on this this locality peer node, inquire the resource information of this second client node, then should this locality peer node can generate a resource identifier Resource-ID, then this resource inquiry information be sent on the P2PSIP peer node that has on the P2PSIP overlapping network with the immediate peer identifier Peer-ID of this resource identifier Resource-ID according to the unified resource identifiers, URIs of second client node that comprises in this resource inquiry information.The Peer-ID here is the sign of P2PSIP peer node in P2PSIP Overlay network, and it and Resource-ID are in same numerical space, and the two can directly compare.Peer-ID can carry out obtaining behind the Hash to the contact address such as the IP address of P2PSIP peer node by using identical hash algorithm, also can distribute to this P2PSIP peer node when the P2PSIP peer node joins P2PSIP Overlay network by a concentrated server.After this peer node received this resource inquiry information, this peer node can be replied the resource information of this second client node to the local peer node that service is provided for first client node.This resource information can be the unified resource identifiers, URIs and for example mapping of IP address of contact address of this second client node, also can be local peer node is passed through hash algorithm (hashing algorithm) generation of P2PSIP overlapping network agreement according to the unified resource identifiers, URIs of second client node resource identifier Resource-ID.
Step S1007, local peer node replys the resource information of second client node to first client node.After local peer node is found the resource information of this second client node, the resource information of this second client node is replied to first client node.
Step S1008, the contact address that first client node carries according to the resource information of second client node that receives sends sip invite message with initiation session to second client node.After local peer node was replied the resource information of this second client node to first client node, first client node just can for example send a sip invite message to initiate the ip voice session to second client node in the IP address by the contact address of second client node.
The method of resource query under the above-mentioned P2P environment, on the basis of resource registering under the prior art P2PSIP framework, increased the step of the resource information of this this locality peer node institute services client node of storage on local peer node, in the step that has increased the resource information of inquiry second client node on local peer node on the basis of sip invite message route handling process.Like this, under the scene of local communication, just reduce the step of the resource information of distributed query second client node on the P2PSIP overlapping network, improved the efficient of local resource inquiry.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform, can certainly pass through hardware, but the former is better execution mode under a lot of situation.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product is stored in the storage medium, comprise that some instructions are with so that a computer equipment (can be a personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
More than disclosed only be several specific embodiment of the present invention, still, the present invention is not limited thereto, any those skilled in the art can think variation all should fall into protection scope of the present invention.
Claims (15)
1, the method for resource query under a kind of P2P environment is characterized in that, may further comprise the steps:
Local peer node receives the resource inquiry information of first client node at second client node;
Described local peer node is according to the resource information of described resource inquiry information at described second client node of local search;
Described local peer node replys the resource information of described second client node to described first client node.
2, the method for resource query under the P2P environment according to claim 1 is characterized in that, and is after receiving the resource inquiry information of first client node at second client node, further comprising the steps of:
Local peer node judges whether described second client node is the client node that described local peer node is served;
If it is the client node that described local peer node is served that described local peer node is judged described second client node, then according to the resource information of described resource inquiry information at described second client node of local search.
3, the method for resource query under the P2P environment according to claim 1 is characterized in that, according to described resource inquiry information after the resource information of described second client node of local search, further comprising the steps of:
If not in the resource information of local search to described second client node, the then resource information of described second client node of distributed query on the P2P overlapping network.
4, the method for resource query under the P2P environment according to claim 1 is characterized in that described resource inquiry information specifically comprises: the resource identifier of described second client node.
5, the method for resource query under the P2P environment according to claim 1 is characterized in that, and is before receiving the resource inquiry information of first client node at second client node, further comprising the steps of:
The resource information of storage client node on local peer node.
6, as the method for resource query under the P2P environment as described in the claim 5, it is characterized in that, described resource information of storing client node on local peer node specifically may further comprise the steps: the resource that receives client node gives out information, and described resource gives out information and carries the resource information of described client node;
Resource according to the described client node that receives gives out information, and described local peer node is stored the resource information of described client node.
7, as the method for resource query under the P2P environment as described in the claim 6, it is characterized in that, store before the resource information of described client node further comprising the steps of in described local peer node:
Described local peer node judges whether to store the resource information of described client node according to local policy;
If judge the resource information of the described client node of storage, then described local peer node is stored the resource information of described client node.
8, as the method for resource query under the P2P environment as described in the claim 5, it is characterized in that, after the resource information of the described client node of storage, further comprising the steps of on local peer node: with the resource information distributed storage of described client node to the P2P overlapping network.
9, a kind of local peer node is characterized in that, comprises resource memory module, message sink module, resource query module and information answer module,
Described resource memory module is used to store the resource information of client node;
Described message sink module is used to receive the resource inquiry information of first client node at second client node;
Described resource query module is used for according to the resource information of described resource inquiry information at described second client node of local search;
Described information answer module is used for the resource information of described second client node is replied to described first client node.
As local peer node as described in the claim 9, it is characterized in that 10, described resource memory module comprises giving out information and receive submodule and local sub module stored,
The described reception submodule that gives out information, the resource that is used to receive client node gives out information, and described resource gives out information and carries the resource information of described client node;
Described local sub module stored is used to store described giving out information and receives the resource information of the described client node that submodule receives.
11, as local peer node as described in the claim 10, it is characterized in that, described resource memory module also comprises storage judgement submodule, be used for after the resource that the described reception submodule that gives out information receives described client node gives out information, judge whether the resource information of the described client node of storage on described local peer node according to local policy, if judge the resource information of the described client node of storage on described local peer node, then described storage judgement submodule notifies described local sub module stored to store the resource information of described client node.
12, as local peer node as described in claim 10 or 11, it is characterized in that, described resource memory module comprises the distributed store submodule, be used for judging that in described storage submodule judges according to local policy on described local peer node after the resource information of the described client node of storage, with the resource information distributed storage of described client node to the P2P overlapping network.
13, as local peer node as described in the claim 9, it is characterized in that, described resource query module comprises the inquiry judging submodule, be used for after described message sink module receives the resource inquiry information of described first client node at second client node, judge whether described second client node is the client node that described local peer node is served.
14, as local peer node as described in the claim 13, it is characterized in that, described resource query module comprises the local search submodule, be used for after described inquiry judging submodule judges that described second client node is the described local peer node client node of serving, in the resource information of described second client node of local search.
15, as local peer node as described in claim 13 or 14, it is characterized in that, described resource query module also comprises the inquiry submodule that distributes, be used for after described inquiry judging submodule judges that described second client node is not the described local peer node client node of serving the resource information of described second client node of distributed query on the P2P overlapping network.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2007101459024A CN101378392A (en) | 2007-08-29 | 2007-08-29 | Method and apparatus for searching resource in P2P circumstance |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2007101459024A CN101378392A (en) | 2007-08-29 | 2007-08-29 | Method and apparatus for searching resource in P2P circumstance |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101378392A true CN101378392A (en) | 2009-03-04 |
Family
ID=40421735
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNA2007101459024A Pending CN101378392A (en) | 2007-08-29 | 2007-08-29 | Method and apparatus for searching resource in P2P circumstance |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101378392A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101854363A (en) * | 2010-05-28 | 2010-10-06 | 北京理工大学 | Information resource access method based on inter-network segment based on instant communication protocol |
CN101662508B (en) * | 2009-09-11 | 2013-04-24 | 华为技术有限公司 | Method for data transmission based on point-to-point protocol, device and system thereof |
WO2013075636A1 (en) * | 2011-11-23 | 2013-05-30 | 中兴通讯股份有限公司 | Distributed hash table intercommunication network system, inter-domain node and implementation method |
CN107153688A (en) * | 2017-04-27 | 2017-09-12 | 努比亚技术有限公司 | A kind of data query method, equipment and computer-readable storage medium |
CN107872486A (en) * | 2016-09-28 | 2018-04-03 | 华为技术有限公司 | Communication means and device |
-
2007
- 2007-08-29 CN CNA2007101459024A patent/CN101378392A/en active Pending
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101662508B (en) * | 2009-09-11 | 2013-04-24 | 华为技术有限公司 | Method for data transmission based on point-to-point protocol, device and system thereof |
CN101854363A (en) * | 2010-05-28 | 2010-10-06 | 北京理工大学 | Information resource access method based on inter-network segment based on instant communication protocol |
CN101854363B (en) * | 2010-05-28 | 2012-12-05 | 北京理工大学 | Information resource access method based on inter-network segment based on instant communication protocol |
WO2013075636A1 (en) * | 2011-11-23 | 2013-05-30 | 中兴通讯股份有限公司 | Distributed hash table intercommunication network system, inter-domain node and implementation method |
CN103139076A (en) * | 2011-11-23 | 2013-06-05 | 中兴通讯股份有限公司 | Distributive hash table intercommunicative network system, inter-domain nodes and implement method |
CN103139076B (en) * | 2011-11-23 | 2017-11-24 | 中兴通讯股份有限公司 | Distributed hashtable intercommunication network system, domain intermediate node and implementation method |
CN107872486A (en) * | 2016-09-28 | 2018-04-03 | 华为技术有限公司 | Communication means and device |
CN107872486B (en) * | 2016-09-28 | 2020-06-02 | 华为技术有限公司 | Communication method and device |
CN107153688A (en) * | 2017-04-27 | 2017-09-12 | 努比亚技术有限公司 | A kind of data query method, equipment and computer-readable storage medium |
CN107153688B (en) * | 2017-04-27 | 2020-11-17 | 努比亚技术有限公司 | Data query method, equipment and computer storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Singh et al. | Peer-to-peer internet telephony using SIP | |
CN100531098C (en) | Point-to-point network system and intercommunicating method for overlapped network node | |
Leggio et al. | Session initiation protocol deployment in ad-hoc networks: a decentralized approach | |
JP2008182670A (en) | P2p sip enabled network communication system, access device, user terminal registration method and session establishment method in the network communication system | |
JP2006094488A (en) | Reduction of storage requirement relating to routing information | |
US8706845B2 (en) | Method, apparatus, and system for maintaining status of bootstrap peer | |
JP2012503350A (en) | IP address discovery | |
US20090100137A1 (en) | Method and apparatus for providing services in a peer-to-peer communications network | |
CN101841522A (en) | SIP network and P2PSIP network intercommunication method and system | |
CN101378392A (en) | Method and apparatus for searching resource in P2P circumstance | |
Greene et al. | Instant messaging & presence management in mobile adhoc networks | |
CN1878117B (en) | Communication method of combining hierarchical structure peer-to-peer network and session initiation protocol | |
CN101635672A (en) | Device and method for realizing convergence service session in group mode | |
Lavinal et al. | A next-generation service overlay architecture | |
Maenpaa et al. | Analysis of delays in a peer-to-peer session initiation protocol overlay network | |
Cirani et al. | Implementation of a framework for a DHT-based Distributed Location Service | |
CN101668038A (en) | Method and system for controlling heterogeneous peer-to-peer network intercommunicating conversation based on basic facility | |
Schmidt et al. | How well does JXTA fit Peer-to-Peer SIP? | |
Leu et al. | Inexpensive high availability solutions for the SIP-based VoIP service | |
Islam et al. | SIP over Peer-to-Peer—Implications and existing approaches | |
Ahson et al. | P2p SIP: network architecture and resource location strategy | |
Knauf et al. | Scalable distributed conference control in heterogeneous peer-to-peer scenarios with SIP | |
Chang et al. | P2P SIP: Network Architecture and Resource Location Strategy | |
Li et al. | Transit-stub architecture for peer-to-peer SIP | |
Houngue et al. | A novel architecture for a Peer-to-Peer Session Initiation Protocol |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20090304 |