Summary of the invention
The invention provides a kind of multi-hop and find the method and apparatus of resource, in order to solve resource discovering promoter in prior art can only search for find that it is registered or is registered platform on resource, the problem that can not find other platforms.
According to one aspect of the present invention, provide a kind of multi-hop to find the method for resource, comprising:
Platform receives and carries the resource discovering request that multi-hop finds constraints information;
Platform finds constraints information according to described multi-hop, carries out resource discovering at this platform, or, by described resource discovering request forward to next platform;
Wherein, when carrying out resource discovering at this platform, find result if get or do not get to find that result but this platform are for finding final jump, then initiate to resource discovering the discovery object information that platform feeds back this jumping; Otherwise, upgrade after described multi-hop finds constraints information and send resource discovering request to next platform.
Alternatively, in the method for the invention, described multi-hop finds that constraints information comprises: find jumping figure restricted information and repeat to find indication information.
Alternatively, in the method for the invention, described repeat find indication information comprise: current completed hop count information and/or find identification information.
Alternatively, in the method for the invention:
When described repeat find indication information comprise described discovery identification information time, described platform is after receiving resource discovering request, judge the local discovery identification information whether storing multi-hop and find in constraints information, if so, then by described resource discovering request forward to next platform; Otherwise, store described discovery identification information, and carry out resource discovering at this platform;
When described repeat to find not comprise described discovery identification information in indication information time, described platform is after receiving resource discovering request, judge whether current jumping figure is less than or equal to current that multi-hop finds in constraints information and completes jumping figure, if so, then by described resource discovering request forward to next platform; Otherwise, carry out resource discovering at this platform.
Alternatively, in the method for the invention:
When described repeat to find indication information comprise current completed hop count information time, the described multi-hop of described renewal finds constraints information, comprising: the multi-hop received is found that the current jumping figure that completed in constraints information adds 1;
When described repeat to find not comprise in indication information current completed hop count information time, the described multi-hop of described renewal finds constraints information, comprising: the multi-hop received is found that the discovery jumping figure restricted information in constraints information subtracts 1.
Alternatively, in the method for the invention, the described discovery object information feeding back this jumping to described resource discovering initiation platform, specifically comprises:
The discovery result of this platform and discovery hop count information corresponding to this platform, according to described resource discovering request forwarding path, are initiated platform feedback to resource discovering by described platform.
According to another aspect of the present invention, also provide a kind of multi-hop to find the method for resource, comprising:
Resource discovering is initiated platform and is jumped the request of platform initiation resource discovering to first; Carry multi-hop in described resource discovering request and find constraints information, carry out the discovery of this platform for the platform receiving request or by request forward to the judgement of next platform;
Resource discovering initiates the discovery result that platform obtains certain platform, and when the jumping figure of this discovery result and correspondence thereof all meets the end condition of setting, jump platform to the original route of certain platform described along described first and continue to initiate the resource discovering request to next platform of certain platform described.
According to the 3rd aspect of the present invention, a kind of resource discovering platform is provided, comprises:
Request reception unit, carries for receiving the resource discovering request that multi-hop finds constraints information;
Finding unit, for finding constraints information according to described multi-hop, carrying out resource discovering at this platform, or, by described resource discovering request forward to next platform; Wherein, when carrying out resource discovering at this platform, find result if get or do not get to find that result but this platform are for finding final jump, then initiate to resource discovering the discovery object information that platform feeds back this jumping; Otherwise, upgrade after described multi-hop finds constraints information and send resource discovering request to next platform.
According to the 4th aspect of the present invention, provide a kind of resource discovering to initiate platform, comprising:
Request initiating cell, initiates resource discovering request for jumping platform to first; Carry multi-hop in described resource discovering request and find constraints information, carry out the discovery of this platform for the platform receiving request or by request forward to the judgement of next platform;
Multi-hop finds administrative unit, for obtaining the discovery result of certain platform, and when the jumping figure of this discovery result and correspondence thereof all meets the end condition of setting, jump platform to the original route of certain platform described along described first and continue to initiate the resource discovering request to next platform of certain platform described.
Beneficial effect of the present invention is as follows:
The present invention finds constraints to carry multi-hop in resource discovering request, and propose a kind of solution can searching for discovery resource on multiple platforms, by multi-hop, promoter can get more more full resource informations.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Embodiment one
The embodiment of the present invention provides a kind of multi-hop to find the method for resource, and be applied in resource discovering platform side, as shown in Figure 1, described method specifically comprises:
Step S101, platform receives and carries the resource discovering request that multi-hop finds constraints information;
Step S102, platform finds constraints information according to described multi-hop, carries out resource discovering at this platform, or, by described resource discovering request forward to next platform;
Wherein, when carrying out resource discovering at this platform, find result if get or do not get to find that result but this platform are for finding final jump, then initiate to resource discovering the discovery object information that platform feeds back this jumping; Otherwise, upgrade after described multi-hop finds constraints information and send resource discovering request to next platform.
Set forth based on above-mentioned principle, provide several concrete and preferred implementation below, in order to refinement and the function optimizing method described in the embodiment of the present invention, to make the enforcement of the present invention program more convenient, accurately.It should be noted that, when not conflicting, following feature can combination in any mutually.
In the embodiment of the present invention, described multi-hop finds that constraints information comprises but is not limited to: find jumping figure restricted information and repeat to find indication information.
Wherein, repeat find indication information comprise: current completed hop count information and/or find identification information.
Further, in the embodiment of the present invention:
When repeating to find that indication information comprises discovery identification information, described platform is after receiving resource discovering request, judge the local discovery identification information whether storing multi-hop and find in constraints information, if so, then by described resource discovering request forward to next platform; Otherwise, store described discovery identification information, and carry out resource discovering at this platform;
When repeating to find not comprise discovery identification information in indication information, described platform is after receiving resource discovering request, judge whether current jumping figure is less than or equal to current that multi-hop finds in constraints information and completes jumping figure, if so, then by described resource discovering request forward to next platform; Otherwise, carry out resource discovering at this platform.
Further, in the embodiment of the present invention, to exclude this jump of this platform for principle, upgrade multi-hop and find constraints information, particularly:
When repeat to find indication information comprise current completed hop count information time, the described multi-hop of described renewal finds constraints information, comprising: the multi-hop received is found that the current jumping figure that completed in constraints information adds 1;
When repeat to find not comprise in indication information current completed hop count information time, the described multi-hop of described renewal finds constraints information, comprising: the multi-hop received is found that the discovery jumping figure restricted information in constraints information subtracts 1.
Further, in the embodiment of the present invention, the described discovery object information feeding back this jumping to described resource discovering initiation platform, specifically comprises:
The discovery result of this platform and discovery hop count information corresponding to this platform, according to described resource discovering request forwarding path, are initiated platform feedback to resource discovering by described platform.
Embodiment two
The embodiment of the present invention provides a kind of multi-hop to find the method for resource, and be applied in resource discovering and initiate platform side, the method matches with method described in embodiment one and carries out multi-hop resource discovering, as shown in Figure 2, specifically comprises the steps:
Step S201, resource discovering is initiated platform and is jumped the request of platform initiation resource discovering to first; Carry multi-hop in described resource discovering request and find constraints information, carry out the discovery of this platform for the platform receiving request or by request forward to the judgement of next platform;
Step S202, resource discovering initiates the discovery result that platform obtains certain platform, and when the jumping figure of this discovery result and correspondence thereof all meets the end condition of setting, jump platform to the original route of certain platform described along described first and continue to initiate the resource discovering request to next platform of certain platform described.
Elaboration through embodiment one, two is known, the present invention finds constraints to carry multi-hop in resource discovering request, propose a kind of solution can searching for discovery resource on multiple platforms, by multi-hop, promoter can get more more full resource informations.
Embodiment three
The embodiment of the present invention provides a kind of multi-hop to find the method for resource, and the present embodiment is set forth the implementation process of method described in the present embodiment by disclosing an embody rule example.
As shown in Figure 3, described in the present embodiment, method comprises the steps:
Step S301, resource discovering is initiated platform (hereinafter referred to as " promoter ") and is sent the request of discovery to CSE1, and wherein carry retrieval and find jumping figure restriction, namely restriction finds at most on several platform, if jumping figure is 5, to find on 5 platforms namely at most.
After step S302, CSE1 receive request, detect in request and whether carry jumping figure restriction, if do not carried, or jumping figure is restricted to 1, then represent that only carrying out search at current platform finds resource requirement, if carry jumping figure restriction, and be greater than 1, then represent in the enterprising line search discovery of this platform.If do not find result, then forward the request to down hop, and carry current jumping figure and jumping figure restriction, go to step S307; If discovery result, then return to promoter by result, and carry current jumping figure.
Step S303, promoter obtains the result of discovery.
Step S304, promoter is satisfied with result or returns jumping figure and reaches the jumping figure upper limit, then terminate discovery procedure; If be unsatisfied with result, then continue to send the request of discovery, and (as S302 walks in the message returned, to carry jumping figure be 1 to carry the jumping figure returned last time, this jumping figure carried also is 1), jumping figure restriction and down hop instruction (be used to indicate the enterprising line search of the down hop CSE returning jumping figure platform to find, namely first skip to return jumping figure platform on without the need to repeat find, Forward-reques).
Step S305, promoter sends the request of discovery to receiving on the CSE that returned results last time, and carry returned last time jumping figure, jumping figure restriction and down hop instruction.
Step S306, the CSE returned results are forwarded on its down hop CSE (as CSE2) after receiving request;
Step S307, down hop CSE repeat the operation of S302, and the rest may be inferred.
Embodiment four
The embodiment of the present invention provides a kind of multi-hop to find the method for resource, present embodiment discloses another embody rule example, to set forth the implementation process of method described in the present embodiment.
As shown in Figure 4, described in the present embodiment, method comprises the steps:
Step S401, promoter sends the request of discovery to CSE1, wherein carry retrieval and find that (restriction finds at most on several platform in jumping figure restriction, if jumping figure is 5, to find on 5 platforms namely at most) and find mark (this finds request for unique identification).
After step S402, CSE1 receive request, detect and whether have this discovery mark: if do not had, then store this and find mark, detect in request simultaneously and whether carry jumping figure restriction: if do not carried, or jumping figure is restricted to 1, then represent that only carrying out search at current platform finds resource requirement; If carry jumping figure restriction, and be greater than 1, then represent in the enterprising line search discovery of this platform; If have this to find mark or there is no the result needed for discovery, then forward the request to down hop, and carry current jumping figure, jumping figure restriction and find mark, go to step S407; If discovery result, then return to promoter by result, and carry current jumping figure.
Step S403, promoter obtains the result of discovery.
Step S404, promoter is satisfied with result or returns jumping figure and reaches the jumping figure upper limit, then terminate discovery procedure; If be unsatisfied with result, then continue to send the request of discovery, and carry the jumping figure (be 1 as carried jumping figure in the message that the 2nd step returns, this jumping figure carried also is 1), the jumping figure restriction that returned last time and find mark.
Step S405, promoter sends the request of discovery to receiving on the CSE that returned results last time, and carries the jumping figure, the jumping figure restriction that returned last time and find mark.
Step S406, the CSE returned results last time identify, so be forwarded on down hop CSE owing to storing corresponding discovery;
Step S407, down hop CSE repeat the operation of S402, and the rest may be inferred.
Embodiment five
The embodiment of the present invention provides a kind of multi-hop to find the method for resource, present embodiment discloses another embody rule example, to set forth the implementation process of method described in the present embodiment.
As shown in Figure 5, described in the present embodiment, method comprises the steps:
Step S501, promoter sends the request of discovery to CSE1, wherein carry retrieval and find that (restriction finds at most jumping figure restriction N on several platform, if jumping figure is 5, to find on 5 platforms namely at most) and find mark (this finds request for unique identification).
After step S502, CSE1 receive request, detect and whether have this discovery mark: if do not had, then store this and find mark, detect in request simultaneously and whether carry jumping figure restriction: if do not carried, or jumping figure is restricted to 1, then represent that only carrying out search at current platform finds resource requirement; If carry jumping figure restriction, and be greater than 1, then represent in the enterprising line search discovery of this platform; If have this to find mark or there is no the result needed for discovery, then forward the request to down hop, and carry the restriction of amended discovery jumping figure and find mark; If discovery result, then return to promoter by result, and carry current jumping figure.Wherein, the discovery jumping figure restriction-1 of carrying in amended discovery jumping figure restriction=request.
Step S503, promoter obtains the result of discovery.
Step S504, promoter is satisfied with result or returns jumping figure and reaches the jumping figure upper limit, then terminate discovery procedure; If be unsatisfied with result, then continue to send the request of discovery, the amendment jumping figure upper limit (deducting the jumping figure returned by the former jumping figure upper limit), the jumping figure carry the restriction of amended jumping figure, finding mark and returned last time.
Step S505, promoter sends the request of discovery to receiving on the CSE that returned results last time, and carries the jumping figure, the jumping figure restriction that returned last time and find mark.
Step S506, the CSE returned results last time identify, so be forwarded on down hop CSE owing to storing corresponding discovery;
Step S507, down hop CSE repeat the operation of S502, and the rest may be inferred.
Embodiment six
The embodiment of the present invention provides a kind of resource discovering platform, as shown in Figure 6, comprising:
Request reception unit 610, carries for receiving the resource discovering request that multi-hop finds constraints information;
Finding unit 620, for finding constraints information according to described multi-hop, carrying out resource discovering at this platform, or, by described resource discovering request forward to next platform; Wherein, when carrying out resource discovering at this platform, find result if get or do not get to find that result but this platform are for finding final jump, then initiate to resource discovering the discovery object information that platform feeds back this jumping; Otherwise, upgrade after described multi-hop finds constraints information and send resource discovering request to next platform.
Based on said structure framework and enforcement principle, provide several concrete and preferred implementation under the above constitution below, in order to refinement and the function optimizing resource discovering platform of the present invention, to make the enforcement of the present invention program more convenient, accurately.Be specifically related to following content:
In the embodiment of the present invention, described multi-hop finds that constraints information comprises but is not limited to: find jumping figure restricted information and repeat to find indication information.
Wherein, repeat find indication information comprise: current completed hop count information and/or find identification information.
Further, in the embodiment of the present invention:
When repeating to find that indication information comprises discovery identification information, find that unit 620 is after receiving resource discovering request, judge the local discovery identification information whether storing multi-hop and find in constraints information, if so, then by described resource discovering request forward to next platform; Otherwise, store described discovery identification information, and carry out resource discovering at this platform;
When repeating to find not comprise discovery identification information in indication information, find that unit 620 is after receiving resource discovering request, judge whether current jumping figure is less than or equal to current that multi-hop finds in constraints information and completes jumping figure, if so, then by described resource discovering request forward to next platform; Otherwise, carry out resource discovering at this platform.
Further, in the embodiment of the present invention:
When repeat to find indication information comprise current completed hop count information time, the described multi-hop of described renewal finds constraints information, comprising: the multi-hop received is found that the current jumping figure that completed in constraints information adds 1;
When repeat to find not comprise in indication information current completed hop count information time, the described multi-hop of described renewal finds constraints information, comprising: the multi-hop received is found that the discovery jumping figure restricted information in constraints information subtracts 1.
Further, in the embodiment of the present invention, find that unit 620 is according to described resource discovering request forwarding path, the discovery result of this platform and discovery hop count information corresponding to this platform are initiated platform feedback to resource discovering.
Embodiment seven
The embodiment of the present invention provides a kind of resource discovering to initiate platform, as shown in Figure 7, comprising:
Request initiating cell 710, initiates resource discovering request for jumping platform to first; Carry multi-hop in described resource discovering request and find constraints information, carry out the discovery of this platform for the platform receiving request or by request forward to the judgement of next platform;
Multi-hop finds administrative unit 720, for obtaining the discovery result of certain platform, and when the jumping figure of this discovery result and correspondence thereof all meets the end condition of setting, jump platform to the original route of certain platform described along described first and continue to initiate the resource discovering request to next platform of certain platform described.
Further, when multi-hop finds that administrative unit 720 determines in the jumping figure finding result and correspondence thereof the end condition having a satisfied setting, then discovery procedure is terminated.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.