Summary of the invention
The embodiment of the present invention provides a kind of method, equipment and system of P2P resource-sharing, realizes the P2P resource sharing under IPv6 and IPv4 mixed networking.
To achieve these goals, the technical scheme that the embodiment of the present invention adopts is,
First aspect, provides a kind of P2P resource share method, comprising:
The first edge super node receives the first inquiry request that the first super node forwards, wherein, and the first resource ID that described the first inquiry request comprises first node requesting query;
The local information that described the first edge super node is inquired about described the first edge super node according to described first resource ID, wherein, the local information of described the first edge super node comprises the resource ID that described the first edge super node can obtain, and corresponding node ID and the IP address of each resource ID;
If determining in the local information of described the first edge super node, described the first edge super node do not comprise described first resource ID, described the first inquiry request is forwarded to the second edge super node, so that described the second edge super node is searched described first resource in the network domains at described the second super node place, edge, wherein, described the first edge super node is connected by IPV4/IPV6 Interworking gateway with described the second edge super node, described the first edge super node is in IPV4 network domains, described the second edge super node is in IPV6 network domains, or described the first edge super node is in IPV6 network domains, described the second edge super node is in IPV4 network domains,
Described the first edge super node receives the first inquiry response message that described the second edge super node sends, wherein, in described the first inquiry response message, comprise destination address, source address, and Payload, described destination address is the address of described first node, described source address is the address of the Section Point of the described first resource of storage, and described source address is after described IPV4/IPV6 Interworking gateway translation, identical with described the first edge super node network domains type of living in, in described Payload, comprise described Section Point ID, the file key of described first resource, and the real ip address of described first resource,
Described the first edge super node is resolved described the first inquiry response message, if determine, the type of real ip address described in described Payload is different from the IP address class type of the residing network domains of described the first edge super node, the described real ip address in described Payload is replaced to the source address in described the first inquiry response message;
Described the first edge super node to described first node, is connected described the first inquiry response message repeating so that described first node is set up P2P according to described the first inquiry response message with described Section Point, and carries out sharing of described first resource.
Second aspect, provides the first edge super node, comprising:
The first receiver module, the first inquiry request forwarding for receiving the first super node, wherein, the first resource ID that described the first inquiry request comprises first node requesting query;
Enquiry module, for the local information of inquiring about described the first edge super node according to described first resource ID, wherein, the local information of described the first edge super node comprises the resource ID that described the first edge super node can obtain, and corresponding node ID and the IP address of each resource ID;
The first sending module, if determine that for described enquiry module the local information of described the first edge super node does not comprise described first resource ID, described the first inquiry request is forwarded to the second edge super node, so that described the second edge super node is searched described first resource in the network domains at described the second super node place, edge, wherein, described the first edge super node is connected by IPV4/IPV6 Interworking gateway with described the second edge super node, described the first edge super node is in IPV4 network domains, described the second edge super node is in IPV6 network domains, or described the first edge super node is in IPV6 network domains, described the second edge super node is in IPV4 network domains,
The second receiver module, the the first inquiry response message sending for receiving described the second edge super node, wherein, in described the first inquiry response message, comprise destination address, source address, and Payload, described destination address is the address of described first node, described source address is the address of the Section Point of the described first resource of storage, and described source address is after described IPV4/IPV6 Interworking gateway translation, identical with described the first edge super node network domains type of living in, in described Payload, comprise described Section Point ID, the file key of described first resource, and the real ip address of described first resource,
Parsing module, for described the first inquiry response message is resolved, if determine, the type of real ip address described in described Payload is different from the IP address class type of the residing network domains of described the first edge super node, the described real ip address in described Payload is replaced to the source address in described the first inquiry response message;
The second sending module, for by described the first inquiry response message repeating to described first node so that described first node is set up P2P according to described the first inquiry response message with described Section Point, be connected, and carry out the shared of described first resource.
The third aspect, a kind of system is provided, comprise: the first edge super node, the second edge super node, described the first edge super node is connected by IPV4/IPV6 Interworking gateway with described the second edge super node, described the first edge super node is in IPV4 network domains, and described the second edge super node is in IPV6 network domains; Or described the first edge super node is in IPV6 network domains, described the second edge super node is in IPV4 network domains;
Wherein, described the first edge super node is used for,
Receive the first inquiry request that the first super node forwards, wherein, the first resource ID that described the first inquiry request comprises first node requesting query;
The local information of inquiring about described the first edge super node according to described first resource ID, wherein, the local information of described the first edge super node comprises the resource ID that described the first edge super node can obtain, and corresponding node ID and the IP address of each resource ID;
If do not comprise described first resource ID in the local information of definite described the first edge super node, described the first inquiry request is forwarded to the second edge super node, so that described the second edge super node is searched described first resource in the network domains at described the second super node place, edge;
Receive the first inquiry response message that described the second edge super node sends, wherein, in described the first inquiry response message, comprise destination address, source address, and Payload, described destination address is the address of described first node, described source address is the address of the Section Point of the described first resource of storage, and described source address is after described IPV4/IPV6 Interworking gateway translation, identical with described the first edge super node network domains type of living in, in described Payload, comprise described Section Point ID, the file key of described first resource, and the real ip address of described first resource,
Described the first inquiry response message is resolved, if determine, the type of real ip address described in described Payload is different from the IP address class type of the residing network domains of described the first edge super node, the described real ip address in described Payload is replaced to the source address in described the first inquiry response message;
Described the first inquiry response message repeating, to described first node, is connected so that described first node is set up P2P according to described the first inquiry response message with described Section Point, and carries out sharing of described first resource.
Therefore, the embodiment of the present invention provides a kind of P2P resource share method, equipment and system, the first edge super node receives the first inquiry request that the first super node forwards, wherein, and the first resource ID that described the first inquiry request comprises first node requesting query, the local information that described the first edge super node is inquired about described the first edge super node according to described first resource ID, wherein, the local information of described the first edge super node comprises the resource ID that described the first edge super node can obtain, and corresponding node ID and the IP address of each resource ID, if determining in the local information of described the first edge super node, described the first edge super node do not comprise described first resource ID, described the first inquiry request is forwarded to the second edge super node, so that described the second edge super node is searched described first resource in the network domains at described the second super node place, edge, wherein, described the first edge super node is connected by IPV4/IPV6 Interworking gateway with described the second edge super node, described the first edge super node is in IPV4 network domains, described the second edge super node is in IPV6 network domains, or described the first edge super node is in IPV6 network domains, described the second edge super node is in IPV4 network domains, described the first edge super node receives the first inquiry response message that described the second edge super node sends, wherein, in described the first inquiry response message, comprise destination address, source address, and Payload, described destination address is the address of described first node, described source address is the address of the Section Point of the described first resource of storage, and described source address is after described IPV4/IPV6 Interworking gateway translation, identical with described the first edge super node network domains type of living in, in described Payload, comprise described Section Point ID, the file key of described first resource, and the real ip address of described first resource, described the first edge super node is resolved described the first inquiry response message, if determine, the type of real ip address described in described Payload is different from the IP address class type of the residing network domains of described the first edge super node, the described real ip address in described Payload is replaced to the source address in described the first inquiry response message, described the first edge super node to described first node, is connected described the first inquiry response message repeating so that described first node is set up P2P according to described the first inquiry response message with described Section Point, and carries out sharing of described first resource.So, by introducing edge super node, realize the P2P resource sharing under IPv6 and IPv4 mixed networking.Overcome in prior art under IPv6 and IPv4 mixed networking, easily caused when the address translation of IPv6 and IPv4 is non-shines upon one by one or the defect of the P2P resource sharing failure that causes during dynamic mapping.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
To facilitate understanding of the present embodiment of the invention, first at this, introduce the several terms that can introduce in embodiment of the present invention description;
Resource (Piece): be file resource, be stored in each ordinary node with piecemeal Piece form.
Resource ID: be the identifier of resource.
Node ID: be node identifier, the unique indications of the overall situation that each node has.
Ordinary node: common P2P node, can be used for storage resources and send resource query request, can preserve the information such as Resource Block and adjacent node (comprising the Resource Block indications that adjacent node comprises), each network domains has a plurality of ordinary nodes.
Super node: safeguard downstream ordinary node information, for resource retrieval, do not do file storage, each network domains can have a plurality of super nodes.
Edge super node: the novel joint of introducing under existing IPv4 and the IPv6 network architecture for the embodiment of the present invention, each network domains can comprise an edge super node, also can comprise a plurality of edges super node, specifically can dispose according to the actual conditions of network domains, edge super node is only disposed at the edge of network domains, does not do file resource storage, and edge super node can move polytype agreement simultaneously, for example, can move IPv6 and IPv4 agreement simultaneously.Edge super node and at least one super node are direct-connected, and this super node expands the address information of this edge super node to other super nodes.
IPv4/IPv6 Interworking gateway, for connecting the edge super node of IPv4 network domains and IPv6 network domains, safeguards the corresponding relation of IPv4 network domains and IPv6 network domains address, the IP address between IPv4 network domains and IPv6 network domains can be translated.
Edge super node controller: direct-connected with all edges super node logic in a wide area, can register and manage by edge super node, strengthen network manageability, when network size is larger, more, the edge super node fault of network egress while enabling the super node in new edge, edge super node controller provides addressing between edge super node and the new edge super node function of register and issue a notice etc., does not do file resource and stores.
Should be understood that the embodiment of the present invention can be applied to the P2P resource-sharing in various mixed networking, the embodiment of the present invention does not limit this.
Be only exemplary, the method for the embodiment of the present invention describes with the P2P resource-sharing being applied under IPv6 and IPv4 mixed networking scene, but this does not form any restriction to the embodiment of the present invention.Referring to Fig. 1, for a kind of IPv6 of embodiment of the present invention setting and the system diagram of IPv4 mixed networking, this system comprises IPV4 network domains and IPV6 network domains, wherein, comprises node 20 in IPV4 network domains, super node 40,50, edge super node 30, comprises node 80 in IPV4 network domains, super node 70, edge super node 60, edge super node 30 is connected by IPv4/IPv6 Interworking gateway 90 with edge super node 60.
On the one hand, the embodiment of the present invention provides a kind of P2P resource share method, it should be noted that, referring to Fig. 1, the invention process example assumes node 20 is first node, and super node 40 is the first super node, edge super node 30 is the first edge super node, node 80 is Section Point, and super node 70 is the second super node, and edge super node 60 is the second edge super node.
Referring to Fig. 2, can comprise the following steps:
Within 201: the first, edge super node receives the first inquiry request that the first super node forwards, wherein, and the first resource ID that described the first inquiry request comprises first node requesting query;
Wherein, first node, when the P2P of registration login first network, generates ID the registration of the unique first node of universe.First node during as new node, is at least known a node in P2P network, and first node can obtain the more specific location information of node from P2P application.First node can be notified other nodes that are associated with first node (for example node in Fig. 1 50) after adding network, upgrades the question blank of other nodes.
Wherein, the first edge super node can human configuration when initial, and (Distributed Hash Table is called for short DHT hash table and calculates to carry out distributed hashtable to be communicated with IPv4 and IPv6 territory.
Suppose that first node need to be from other nodes sharing first resources, first node sends the first inquiry request to the node adjacent with first node, and this inquiry request comprises first resource ID;
The adjacent node of first node is inquired about the local information of this adjacent node, the local information of this adjacent node can comprise the resource ID information of the resource of this adjacent node storage, and the resource ID of the resource that can obtain of this adjacent node and corresponding address information, if adjacent node is determined the locating information buffer memory that local information comprises first resource, node (Node Identifier for example, be called for short NID), the IP address of first resource, so just returns to the data source of the locating information of first resource; If the local information of adjacent node does not have the locating information of first resource, this adjacent node can be forwarded to this inquiry request the first super node so.
When the first super node is received this first inquiry request, can preferentially check the local information of the first super node, the local information of the first super node can comprise the resource ID of the first super node record, and corresponding node ID and the IP address of each resource ID, for example, the local information of the first super node can exist with the form of routing table, if comprise the address information that first resource ID and first resource are corresponding (comprising node ID and IP address that this first resource is corresponding) in the local information of the first super node, the first super node can return to first node the address information of this first resource, if do not comprise first resource ID and address information corresponding to first resource in the local information of the first super node, the first super node can be transmitted to other super nodes by the first inquiry request and inquires about, when if all super nodes all cannot find the positional information of first resource, the first inquiry request is transmitted to the first edge super node.
202: the local information that described the first edge super node is inquired about described the first edge super node according to described first resource ID, wherein, the local information of described the first edge super node comprises the resource ID that described the first edge super node can obtain, and corresponding node ID and the IP address of each resource ID;
When the first edge super node is received this first inquiry request, can preferentially check the local information of the first edge super node, the local information of the first edge super node can comprise the resource ID of the first edge super node record, and corresponding node ID and the IP address of each resource ID; For example, the local information of the first edge super node can exist with the form of routing table, if comprise the address information that first resource ID and first resource are corresponding (comprising node ID and IP address that this first resource is corresponding) in the local information of the first edge super node, the first edge super node can send first node to step by step to the address information of first resource.
203: if described the first edge super node is determined in the local information of described the first edge super node, do not comprise described first resource ID, described the first inquiry request is forwarded to the second edge super node, so that described the second edge super node is searched described first resource in the network domains at described the second super node place, edge, wherein, described the first edge super node is connected by IPV4/IPV6 Interworking gateway with described the second edge super node, described the first edge super node is in IPV4 network domains, described the second edge super node is in IPV6 network domains, or described the first edge super node is in IPV6 network domains, described the second edge super node is in IPV4 network domains,
If do not comprise first resource ID and address information corresponding to first resource in the local information of the first edge super node, if there is other edge super nodes in current network territory, the first edge super node can be transmitted to the first inquiry request other edge super nodes and inquires about, when if all edges super node all cannot find the positional information of first resource, the first edge super node is transmitted to the second edge super node in other network domains by the first inquiry request.
When in IPV6 network domains, the second edge super node receives the first inquiry request that the first edge super node of IPV6 network domains sends, can be in self storage and territory super node search until find or complete the whole network and search.If find, the second edge super node sends to the first edge super node by the first inquiry response message.If do not find, other edge super nodes, are transmitted to the first inquiry request the super joint in other edges if present.If until inquire about complete network, all do not find the positional information of first resource, return to first resource and do not exist.
204, described the first edge super node receives the first inquiry response message that described the second edge super node sends, wherein, in described the first inquiry response message, comprise destination address, source address, and Payload, described destination address is the address of described first node, described source address is the address of the Section Point of the described first resource of storage, and described source address is after described IPV4/IPV6 Interworking gateway translation, identical with described the first edge super node network domains type of living in, in described Payload, comprise described Section Point ID, the file key of described first resource, and the real ip address of described first resource,
Wherein, IPV4/IPV6 Interworking gateway can be safeguarded the corresponding relation between IPV4 and IPV6, the first inquiry response message is when through IPV4/IPV6 Interworking gateway, IPV4/IPV6 Interworking gateway can be translated source address wherein, makes the source address after translation identical with described the first edge super node network domains type of living in.For example, in the present embodiment, the IP address of the Section Point of storage first resource is IPV6 address, the second edge super node adds the first inquiry response message using the IP address of the Section Point of IPV6 form as source address, IPV4/IPV6 Interworking gateway is by the IP address of the Section Point of the IP address translation IPV4 form of the Section Point of IPV6 form, and the IP address of the Section Point of the IPV4 form after translating adds the first inquiry response message as source address.
205, described the first edge super node is resolved described the first inquiry response message, if determine, the type of real ip address described in described Payload is different from the IP address class type of the residing network domains of described the first edge super node, the described real ip address in described Payload is replaced to the source address in described the first inquiry response message;
For example, after the first edge super node is resolved described the first inquiry response message, obtain the destination address in described the first inquiry response message, source address, and Payload, described destination address is the address of described first node, described source address is Section Point address after the translation of IPV4/IPV6 Interworking gateway, and after resolving, the first edge super node obtains the Section Point ID comprising in Payload, the file key of first resource, and the real ip address of first resource; In order to make first node, can identify the IP address of first resource, so, the first edge super node is resolved the real ip address that obtains first resource, judge that whether this real ip address is identical with the IP address class type in current network territory, as excessively different, illustrate that first node can not identify this real ip address, because source address is the Section Point address after the translation of IPV4/IPV6 Interworking gateway, can be identified by first node, so the first edge super node is replaced this real ip address by source address.
206, described the first edge super node by described the first inquiry response message repeating to described first node, so that described first node is set up P2P according to described the first inquiry response message with described Section Point, be connected, and carry out sharing of described first resource.
First node obtains after the first inquiry response message, according to the Section Point ID in Payload in described the first inquiry response message, the file key of first resource, and the IP address of first resource (after translation) can set up P2P with Section Point and be connected, and setting up the first resource of sharing Section Point after P2P connects, so, translation through IPV4/IPV6 Interworking gateway to IP address, and first judgement and the replacement of edge super node to the IP address in the Payload after resolving, the IP address that first node is received can be identified, guarantee that P2P is successfully established.
Further, for the validity that improves the efficiency of inquiry and guarantee address translation, described method also comprises:
Described the first edge super node is stored to file address information by the real ip address of described first resource ID and described first resource, wherein, described file address packets of information is inquired about the resource ID of gained and the real ip address corresponding with described resource ID containing described the first edge super node at every turn.
The first edge super node is by the file address information of the each inquiry of storage, after being queried before a certain resource, when again inquiring about this resource, real IP address that can this resource of quick obtaining, because the IPV4 that IPV4/IPV6 Interworking gateway is safeguarded and the mapping of the address between IPV6 are to being dynamic corresponding relation, so, the real IP address of this resource is in IP address that in the same time can not corresponding different translation, so, the translation IP address of inquiry between the first edge super node can not directly return to requesting node, but, real IP address corresponding to this resource is constant, so, the first edge super node can be according to the translation IP address of the real IP address request IPV4/IPV6 Interworking gateway current time of this resource, specifically can embody by following process.
The first edge super node receives the second inquiry request that described the first super node forwards, wherein, the Secondary resource ID that described the second inquiry request comprises the 3rd node requesting query, described the 3rd node is any one node in described the first super node place, edge network domains.
The first edge super node is inquired about described file address information according to described Secondary resource ID, if determine in the information of described file address and comprise described Secondary resource ID, to described IPV4/IPV6 Interworking gateway, send real ip address corresponding to described Secondary resource ID, so that the real ip address that described IPV4/IPV6 Interworking gateway is described Secondary resource ID provides translating address.
Wherein, if there is the translation IP address of the real ip address that Secondary resource ID is corresponding in IPV4/IPV6 Interworking gateway current time, can directly to the first edge super node, return to this translation IP address, if current time IPV4/IPV6 Interworking gateway does not exist the translation IP address of the real ip address that Secondary resource ID is corresponding, IPV4/IPV6 Interworking gateway can be that the real ip address that this Secondary resource ID is corresponding distributes translation IP address immediately.
The first edge super node receives the translating address of the real ip address of the described Secondary resource that described IPV4/IPV6 Interworking gateway sends;
The first edge super node by the second inquiry response message repeating to described the 3rd node, so that setting up P2P according to described the second inquiry response message with the node at described Secondary resource ID place, described the 3rd node is connected, and carry out sharing of described Secondary resource, wherein, in described the second inquiry response message, comprise destination address, source address, and Payload, described destination address is described the 3rd address of node, described source address is the translating address of the real ip address of described Secondary resource, the node ID that comprises described Secondary resource place in described Payload, the file key of described Secondary resource, and the translating address of the real ip address of described Secondary resource.
Therefore the embodiment of the present invention provides a kind of P2P resource share method, the first edge super node receives the first inquiry request that the first super node forwards, wherein, and the first resource ID that described the first inquiry request comprises first node requesting query, the local information that described the first edge super node is inquired about described the first edge super node according to described first resource ID, wherein, the local information of described the first edge super node comprises the resource ID that described the first edge super node can obtain, and corresponding node ID and the IP address of each resource ID, if determining in the local information of described the first edge super node, described the first edge super node do not comprise described first resource ID, described the first inquiry request is forwarded to the second edge super node, so that described the second edge super node is searched described first resource in the network domains at described the second super node place, edge, wherein, described the first edge super node is connected by IPV4/IPV6 Interworking gateway with described the second edge super node, described the first edge super node is in IPV4 network domains, described the second edge super node is in IPV6 network domains, or described the first edge super node is in IPV6 network domains, described the second edge super node is in IPV4 network domains, described the first edge super node receives the first inquiry response message that described the second edge super node sends, wherein, in described the first inquiry response message, comprise destination address, source address, and Payload, described destination address is the address of described first node, described source address is the address of the Section Point of the described first resource of storage, and described source address is after described IPV4/IPV6 Interworking gateway translation, identical with described the first edge super node network domains type of living in, in described Payload, comprise described Section Point ID, the file key of described first resource, and the real ip address of described first resource, described the first edge super node is resolved described the first inquiry response message, if determine, the type of real ip address described in described Payload is different from the IP address class type of the residing network domains of described the first edge super node, the described real ip address in described Payload is replaced to the source address in described the first inquiry response message, described the first edge super node to described first node, is connected described the first inquiry response message repeating so that described first node is set up P2P according to described the first inquiry response message with described Section Point, and carries out sharing of described first resource.So, by introducing edge super node, realize the P2P resource sharing under IPv6 and IPv4 mixed networking.Overcome in prior art under IPv6 and IPv4 mixed networking, easily caused the non-mapping relations one by one of address translation of IPv6 and IPv4 or the defect of the P2P resource sharing failure that dynamic mapping causes.
On the one hand, the embodiment of the present invention provides a kind of the first edge super node 30, referring to Fig. 3, comprising:
The first receiver module 301, the first inquiry request forwarding for receiving the first super node, wherein, the first resource ID that described the first inquiry request comprises first node requesting query;
Enquiry module 302, for the local information of inquiring about described the first edge super node according to described first resource ID, wherein, the local information of described the first edge super node comprises the resource ID that described the first edge super node can obtain, and corresponding node ID and the IP address of each resource ID;
The first sending module 303, if determine that for described enquiry module the local information of described the first edge super node does not comprise described first resource ID, described the first inquiry request is forwarded to the second edge super node, so that described the second edge super node is searched described first resource in the network domains at described the second super node place, edge, wherein, described the first edge super node is connected by IPV4/IPV6 Interworking gateway with described the second edge super node, described the first edge super node is in IPV4 network domains, described the second edge super node is in IPV6 network domains, or described the first edge super node is in IPV6 network domains, described the second edge super node is in IPV4 network domains,
The second receiver module 304, the the first inquiry response message sending for receiving described the second edge super node, wherein, in described the first inquiry response message, comprise destination address, source address, and Payload, described destination address is the address of described first node, described source address is the address of the Section Point of the described first resource of storage, and described source address is after described IPV4/IPV6 Interworking gateway translation, identical with described the first edge super node network domains type of living in, in described Payload, comprise described Section Point ID, the file key of described first resource, and the real ip address of described first resource,
Parsing module 305, for described the first inquiry response message is resolved, if determine, the type of real ip address described in described Payload is different from the IP address class type of the residing network domains of described the first edge super node, the described real ip address in described Payload is replaced to the source address in described the first inquiry response message;
The second sending module 306, for by described the first inquiry response message repeating to described first node so that described first node is set up P2P according to described the first inquiry response message with described Section Point, be connected, and carry out the shared of described first resource.
Further, referring to Fig. 4, the first edge super node 30 also comprises:
Memory module 307, for the real ip address of described first resource ID and described first resource is stored to file address information, wherein, described file address packets of information is inquired about the resource ID of gained and the real ip address corresponding with described resource ID containing described the first edge super node at every turn.
Further,
The first receiver module 301 also for, receive the second inquiry request that described the first super node forwards, wherein, the Secondary resource ID that described the second inquiry request comprises the 3rd node requesting query, described the 3rd node is any one node in described the first super node place, edge network domains;
Described enquiry module 302 also for, according to described Secondary resource ID, inquire about described file address information;
Described the first sending module 303 also for, if determining, described enquiry module in the information of described file address, comprises described Secondary resource ID, to described IPV4/IPV6 Interworking gateway, send real ip address corresponding to described Secondary resource ID, so that the real ip address that described IPV4/IPV6 Interworking gateway is described Secondary resource ID provides translating address;
Described the second receiver module 304 also for, receive the translating address of the real ip address of the described Secondary resource that described IPV4/IPV6 Interworking gateway sends;
Described the second sending module 306 also for, by the second inquiry response message repeating to described the 3rd node, so that setting up P2P according to described the second inquiry response message with the node at described Secondary resource ID place, described the 3rd node is connected, and carry out sharing of described Secondary resource, wherein, in described the second inquiry response message, comprise destination address, source address, and Payload, described destination address is described the 3rd address of node, described source address is the translating address of the real ip address of described Secondary resource, the node ID that comprises described Secondary resource place in described Payload, the file key of described Secondary resource, and the translating address of the real ip address of described Secondary resource.
Therefore the embodiment of the present invention provides a kind of the first edge super node, receive the first inquiry request that the first super node forwards, wherein, the first resource ID that described the first inquiry request comprises first node requesting query, the local information that described the first edge super node is inquired about described the first edge super node according to described first resource ID, wherein, the local information of described the first edge super node comprises the resource ID that described the first edge super node can obtain, and corresponding node ID and the IP address of each resource ID, if determining in the local information of described the first edge super node, described the first edge super node do not comprise described first resource ID, described the first inquiry request is forwarded to the second edge super node, so that described the second edge super node is searched described first resource in the network domains at described the second super node place, edge, wherein, described the first edge super node is connected by IPV4/IPV6 Interworking gateway with described the second edge super node, described the first edge super node is in IPV4 network domains, described the second edge super node is in IPV6 network domains, or described the first edge super node is in IPV6 network domains, described the second edge super node is in IPV4 network domains, described the first edge super node receives the first inquiry response message that described the second edge super node sends, wherein, in described the first inquiry response message, comprise destination address, source address, and Payload, described destination address is the address of described first node, described source address is the address of the Section Point of the described first resource of storage, and described source address is after described IPV4/IPV6 Interworking gateway translation, identical with described the first edge super node network domains type of living in, in described Payload, comprise described Section Point ID, the file key of described first resource, and the real ip address of described first resource, described the first edge super node is resolved described the first inquiry response message, if determine, the type of real ip address described in described Payload is different from the IP address class type of the residing network domains of described the first edge super node, the described real ip address in described Payload is replaced to the source address in described the first inquiry response message, described the first edge super node to described first node, is connected described the first inquiry response message repeating so that described first node is set up P2P according to described the first inquiry response message with described Section Point, and carries out sharing of described first resource.So, by introducing edge super node, realize the P2P resource sharing under IPv6 and IPv4 mixed networking.Overcome in prior art under IPv6 and IPv4 mixed networking, easily caused the non-mapping relations one by one of address translation of IPv6 and IPv4 or the defect of the P2P resource sharing failure that dynamic mapping causes.
On the one hand, the embodiment of the present invention provides a kind of system, referring to Fig. 1, this system comprises: the first edge super node 30, the second edge super node 60, described the first edge super node 30 is connected by IPV4/IPV6 Interworking gateway 90 with described the second edge super node 60
Need to illustrate, described the first edge super node 30 is in IPV4 network domains, and described the second edge super node 60 is in IPV6 network domains; Or described the first edge super node 30 is in IPV6 network domains, described the second edge super node 60 is in IPV4 network domains; The embodiment of the present invention does not limit this, and Fig. 1 is only the exemplary illustration carrying out with a kind of situation.
Wherein, described the first edge super node 30 for,
Receive the first inquiry request that the first super node 40 forwards, wherein, the first resource ID that described the first inquiry request comprises first node 20 requesting queries;
The local information of inquiring about described the first edge super node according to described first resource ID, wherein, the local information of described the first edge super node 30 comprises the resource ID that described the first edge super node can obtain, and corresponding node ID and the IP address of each resource ID;
If do not comprise described first resource ID in the local information of definite described the first edge super node 30, described the first inquiry request is forwarded to the second edge super node 60, so that described the second edge super node 60 is searched described first resource in the network domains at described the second edge super node 60 places;
Receive the first inquiry response message that described the second edge super node 60 sends, wherein, in described the first inquiry response message, comprise destination address, source address, and Payload, described destination address is the address of described first node, described source address is the address of the Section Point 80 of the described first resource of storage, and described source address is after described IPV4/IPV6 Interworking gateway translation, identical with described the first edge super node 30 network domains type of living in, in described Payload, comprise described Section Point ID, the file key of described first resource, and the real ip address of described first resource,
Described the first inquiry response message is resolved, if determine, the type of real ip address described in described Payload is different from the IP address class type of described the first edge super node 30 residing network domains, the described real ip address in described Payload is replaced to the source address in described the first inquiry response message;
Described the first inquiry response message repeating, to described first node 20, is connected so that described first node 20 is set up P2P according to described the first inquiry response message with described Section Point 80, and carries out sharing of described first resource.
Further, described the first edge super node 30 also for: the real ip address of described first resource ID and described first resource is stored to file address information, wherein, described file address packets of information is inquired about the resource ID of gained and the real ip address corresponding with described resource ID containing described the first edge super node at every turn.
Further, described the first edge super node 30 also for:
Receive the second inquiry request that described the first super node 40 forwards, wherein, the Secondary resource ID that described the second inquiry request comprises the 3rd node requesting query, described the 3rd node is any one node in described the first super node place, edge network domains;
According to described Secondary resource ID, inquire about described file address information;
If determine in the information of described file address and comprise described Secondary resource ID, to described IPV4/IPV6 Interworking gateway, send real ip address corresponding to described Secondary resource ID, so that the real ip address that described IPV4/IPV6 Interworking gateway is described Secondary resource ID provides translating address;
Receive the translating address of the real ip address of the described Secondary resource that described IPV4/IPV6 Interworking gateway sends;
By the second inquiry response message repeating to described the 3rd node, so that setting up P2P according to described the second inquiry response message with the node at described Secondary resource ID place, described the 3rd node is connected, and carry out sharing of described Secondary resource, wherein, in described the second inquiry response message, comprise destination address, source address, and Payload, described destination address is described the 3rd address of node, described source address is the translating address of the real ip address of described Secondary resource, the node ID that comprises described Secondary resource place in described Payload, the file key of described Secondary resource, and the translating address of the real ip address of described Secondary resource.
Further, described system also comprises: edge super node controller, described edge super node controller is connected with the edge super node logic in described system, for new edge super node is registered and managed, provide issuing of addressing between the described edge edge super node that super node controller is managed and notice.
Therefore the system that the embodiment of the present invention provides, by introducing edge super node, realizes the P2P resource sharing under IPv6 and IPv4 mixed networking.Overcome in prior art under IPv6 and IPv4 mixed networking, easily caused the non-mapping relations one by one of address translation of IPv6 and IPv4 or the defect of the P2P resource sharing failure that dynamic mapping causes.
Finally it should be noted that: above embodiment only, in order to technical scheme of the present invention to be described, is not intended to limit; Although the present invention is had been described in detail with reference to previous embodiment, those of ordinary skill in the art is to be understood that: its technical scheme that still can record aforementioned each embodiment is modified, or part technical characterictic is wherein equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.