Summary of the invention
Exemplary embodiment of the present invention is to provide a kind of method and dress for distributing cache server in complex network
It sets, the phenomenon that so as to avoid the occurrence of service redundant while guaranteeing the service quality of each node.
The one side of an exemplary embodiment of the present invention provides one kind and distributes cache server in complex network
Method, which comprises (a) select start node;(b) select the neighbor node of the start node as shrinkable section
Point;(c) the sum of the start node and flow of shrinkable node are calculated;If (d) the sum of calculated flow is greater than or waits
In first threshold, then the start node and shrinkable node are provided for the corporations of distribution cache server, wherein the
One threshold value is related to the capacity of cache server.
Selectively, the step of selecting start node can include: select the node of maximum flow as start node.
Selectively, the step of selecting start node can include: by the section of the node of maximum flow and the maximum flow
The most node of the shared neighbor node of point and the node more with the shared neighbor node quantity time of the node of the maximum flow merge
For dummy node, and start node is set by the dummy node.
Selectively, the step of neighbor node of the start node is as shrinkable node is selected can include: from described
It is selected in the neighbor node of start node with the highest node of start node similarity as shrinkable node.
Selectively, if the method may also include that the sum of (e) calculated flow is less than first threshold, by institute
It states start node and shrinkable node merges into dummy node, set start node for the dummy node, and execute step
(b)。
Selectively, step (e) can include: determine in complex network with the presence or absence of remaining node;If complex network
In there are remaining nodes, then for remaining node execute step (b).
Selectively, step (e) may also include that if there is no remaining nodes in complex network, be included within institute
Each node in dummy node is stated to be incorporated in the corporations adjacent with each node.
Selectively, each node being included in the dummy node is incorporated to the corporations adjacent with each node
In step can include: determination include the sum of flow of each node in the dummy node whether be less than second threshold,
Wherein, second threshold is less than first threshold and related to the capacity of cache server;If including in the dummy node
The sum of flow of each node is less than second threshold, then each node being included in the dummy node be incorporated to it is described each
The adjacent corporations of a node;If including that the sum of flow of each node in the dummy node is greater than or equal to the second threshold
Value, the then node being included in the dummy node are provided for the corporations of distribution cache server.
Selectively, step (d) can include: determine in complex network with the presence or absence of remaining node;If complex network
In there are remaining nodes, then for remaining node execute step (a).
The another aspect of an exemplary embodiment of the present invention provides one kind and distributes buffer service in complex network
The device of device, described device include: selecting unit, select start node and select the neighbor node of the start node as can
Shrink node;Computing unit calculates the sum of the start node and the flow of shrinkable node;Control unit, if calculated
The sum of flow be greater than or equal to first threshold, then the start node and shrinkable node are provided for distribution caching clothes
The corporations of business device, wherein first threshold is related to the capacity of cache server.
It, can be based on each node in network by using the method and apparatus of an exemplary embodiment of the present invention
Capacity adaptively distribute buffer, to avoid the occurrence of service redundant while guaranteeing the service quality of each node
The phenomenon that.
Part in following description is illustrated into the other aspect and/or advantage of present general inventive concept, there are also one
Dividing will be apparent by description, or can learn by the implementation of present general inventive concept.
Specific embodiment
Now will be referring in particular to its exemplary exemplary embodiment be shown in the accompanying drawings, in the accompanying drawings, identical label begins
Similar element is indicated eventually.In this respect, the present exemplary embodiment can have different form, should not be construed as limited to explain herein
The description stated.Correspondingly, the various aspects of this specification are only explained below by exemplary embodiment is described with reference to.
About term as used herein, selected as much as possible in the case where considering the function in exemplary embodiment most wide
The general term used;However, these terms can change according to the appearance of the intention of those skilled in the art, legal precedent or new technology
Become.Some terms as used herein can arbitrarily be selected by applicant.In this case, these terms will be below by specifically fixed
Justice.Correspondingly, specific term as used herein should be understood based on its unique meaning and the whole context of this design.
It will be further understood that when using the terms "include", "comprise" and " having " herein, unless otherwise defined,
The term illustrates the presence of cited element, but is not excluded for the presence or addition of other elements.In addition, art as used herein
Language " unit " and " module " indicate the unit for handling at least one functions or operations, wherein the unit can be by hardware, soft
The combination of part or hardware and software is realized.
Exemplary embodiment is specifically described below with reference to accompanying drawings, so that those of ordinary skill in the art can be easily real
Existing present inventive concept.However, present inventive concept can be realized in many different ways, and should not be considered as limited to set forth herein
Exemplary embodiment.In addition, being shown the part unrelated with the description of exemplary embodiment is omitted in the accompanying drawings with being explicitly described
Example property embodiment, similar label will indicate similar element throughout the specification.
Fig. 1 is the method that cache server is distributed in complex network for showing an exemplary embodiment of the present invention
Flow chart.
Hereinafter, by being described with the example that content distributing network (CDN) is complex network.It should be understood, however, that according to this
The method and apparatus of the exemplary embodiment of invention is equally applicable to other kinds of complex network, for example, information centre's net
Network etc..
It, can be from including selecting start node in multiple nodes in complex network in step S101.It is according to the present invention
The node of maximum flow can be selected as start node by traversal whole network by exemplary embodiment.It is according to the present invention
Another exemplary embodiment may be selected arbitrary node, and the node of maximum flow in the preset range of the arbitrary node selected
For start node.
It in accordance with an alternative illustrative embodiment of the present invention, can be by the node of the maximum flow in network and the maximum flow
Node share the most node of neighbor node and share the more node of neighbor node quantity time with the node of the maximum flow and close
It and is dummy node, and set start node for the dummy node.More than two nodes are merged into a dummy node
The node contraction being referred to alternatively as in corporations.
Then, in step S103, the neighbor node of start node may be selected as shrinkable node.When there are it is multiple with it is first
When the adjacent neighbor node of beginning node, it can will be selected as initially in multiple neighbor nodes with the highest node of start node similarity
The shrinkable node of node.
Here, the similarity between node can be defined by following equation 1.
[equation 1]
Wherein, KiAnd KjThe degree of node i, j, N can be respectively indicatedijIndicate the quantity for the neighbor node that node i and j share.
Here, the degree of node can be defined as the quantity for the neighbor node connecting with the node.
An exemplary embodiment of the present invention, can be first by the node of the maximum flow in network and the maximum flow
Node share the most node of neighbor node and share the more node of neighbor node quantity time with the node of the maximum flow and close
And for dummy node and start node is set by the dummy node, and then select highest with the similarity of the start node
Node is as shrinkable node.In this way, similarity calculation institute can be effectively reduced by merging three nodes in the initial step
The operand of need and the topological structure for keeping former network.
In step S105, the sum of start node and the flow of shrinkable node can be calculated.In step S107, it may be determined that calculate
Whether the sum of flow out is greater than or equal to first threshold.
It, can be by start node and can in step S111 if the sum of calculated flow is greater than or equal to first threshold
Shrink the corporations that node is provided for distribution cache server.An exemplary embodiment of the present invention, first threshold and slow
The capacity for depositing server is related.For example, first threshold Φ=β × Ω, wherein β is the upper limit factor, and Ω is the appearance of cache server
Amount.In general, β can be set to the value between 0.6 to 1.
It, can be by start node and shrinkable section if the sum of calculated flow is less than first threshold in step S109
Point merges into dummy node.Here, union operation, which refers to using dummy node, substitutes the start node and shrinkable node,
By the dummy node with and the start node and the adjacent node of shrinkable node be connected.Exemplary implementation according to the present invention
Example can keep as far as possible former net by selecting the highest neighbor node of similarity as shrinkable node and merging
In the case where the topological structure of network, the corporations for distributing cache server are marked off.
Fig. 2 shows the network topology structures of an exemplary embodiment of the present invention.Assuming that the network node D in Fig. 2
For maximum flow node and be selected as start node, and node B is that the most node of neighbor node, section are shared with node D
Point A is that the more node of neighbor node time is shared with node D.An exemplary embodiment of the present invention, can by node D, node B and
Node A merges into dummy node V, and the network topology structure after merging is as shown in Figure 3.It can set dummy node V to just
Beginning node.Assuming that node F is and the highest neighbor node of node V similarity, that is, node F is the shrinkable node of node V.Such as
The sum of flow of fruit node F and node V is greater than or equal to first threshold, then node A, node B, node D and node F can be arranged
For the corporations for distributing cache server.If the sum of flow of node F and node V is less than first threshold, can be by node F
Dummy node V ' is merged into node V, and then selects the highest neighbor node of similarity as can receive for dummy node V '
Casing coupling point.
In step S115, it may be determined that with the presence or absence of the corporations being not configured to for distributing cache server in complex network
Remaining node.If it is determined that there are remaining nodes in complex network, then in step S117, set dummy node to just
Beginning node, and return to step S103, that is, select the neighbor node of the start node of setting as shrinkable node.
An exemplary embodiment of the present invention can be iteratively performed step S103, step S105, step S107, step
S109, step S115 and step S117 are until the sum of calculated flow is greater than first threshold or remaining node is not present.
After start node and shrinkable node are provided for the corporations of distribution cache server by step S111, In
Step S113, it may be determined that with the presence or absence of the remaining section for being not configured to the corporations for distributing cache server in complex network
Point.If there are remaining node, return step S101 in complex network, that is, reselect initial section from remaining node
Point.
Specifically, start node (step S101) can be reselected from remaining node.It is according to the present invention exemplary
Embodiment can select the node of maximum flow as start node from remaining node, to be arranged for remaining node
For distributing the corporations of cache server.It in accordance with an alternative illustrative embodiment of the present invention, can be by the flow in remaining node
The node of maximum node and the maximum flow shares the most node of neighbor node and is total to the node of the maximum flow
The node for having neighbor node quantity time more merges into dummy node, and sets start node for the dummy node.
An exemplary embodiment of the present invention, return step S115 then can will include if there is no remaining node
Each node in dummy node is incorporated in the corporations adjacent with each node.
Specifically, if there is no remaining node, then in step S119, it may be determined that including each in dummy node
Whether the sum of flow of node is less than second threshold.Second threshold is less than first threshold and related to the capacity of cache server.
For example, second thresholdWherein, α is the lower limit factor, and Ω is that cache server services saturation value.In general, can be by α
The value being set as between 0 to 0.5.
It, will in step S121 if including that the sum of flow of each node in dummy node is less than second threshold
The corporations adjacent with each node are incorporated to including each node in dummy node.If including in dummy node
The sum of flow of each node is greater than or equal to second threshold, then sets in the node that step S123 can be included in dummy node
It is set to the corporations for distributing cache server.
Buffer is adaptively distributed by the capacity based on each node in network, can guarantee each node
While service quality, the phenomenon that avoiding the occurrence of service redundant.
Fig. 4 shows the device 400 that cache server is distributed in complex network of an exemplary embodiment of the present invention
Block diagram.
Referring to Fig. 4, the device 400 for distributing cache server includes selecting unit 401, computing unit 403 and control
Unit 405.
An exemplary embodiment of the present invention, selecting unit 401 may be selected start node and select the start node
Neighbor node as shrinkable node.For example, selecting unit 401 can be from including selecting in multiple nodes in complex network
Start node.As an example, the node of maximum flow can be determined as initially saving by selecting unit 401 by traversal whole network
Point.As another example, selecting unit 401 may be selected arbitrary node, and by maximum flow in the preset range of the arbitrary node
Node be determined as start node.
In accordance with an alternative illustrative embodiment of the present invention, selecting unit 401 can by the node of the maximum flow in network, with
The node of the maximum flow shares the most node of neighbor node and shares neighbor node quantity time with the node of the maximum flow
More nodes merges into dummy node, and sets start node for the dummy node.In this way, by merging in the initial step
Three nodes, operand needed for similarity calculation can be effectively reduced and the topological structure for keeping former network.
An exemplary embodiment of the present invention, the neighbor node conduct that start node may be selected in selecting unit 401 can receive
Casing coupling point.When there are multiple adjacent with start node neighbor nodes, selecting unit 401 can will in multiple neighbor nodes and just
The beginning highest node of node similarity is selected as the shrinkable node of start node.Since the calculation method to similarity carries out
Description, therefore no longer Ao Shu herein.
In accordance with an alternative illustrative embodiment of the present invention, it is preferable that selecting unit 401 can first by the flow in network most
Big node, the node most with the shared neighbor node of node of the maximum flow and the shared neighbours of node with the maximum flow
The more node of number of nodes time merges into dummy node and sets start node for the dummy node, and then selects first with this
The highest node of the similarity of beginning node is as shrinkable node.An exemplary embodiment of the present invention, it is similar by selecting
Highest neighbor node is spent as shrinkable node and is merged, it can be in the feelings for the topological structure for keeping former network as far as possible
Under condition, the corporations for distributing cache server are marked off.
Computing unit 403 can calculate the sum of start node and the flow of shrinkable node, and by the sum of calculated flow
It is sent to control unit 405.Computing unit 403 can also calculate the sum of the flow including each node in dummy node.
Control unit 405 can determine whether the sum of calculated flow is greater than or equal to first threshold.If calculated
The sum of flow is greater than or equal to first threshold, then start node and shrinkable node can be provided for point by control unit 405
Corporations with cache server.Then, control unit 405 can determine to whether there is in complex network and be not configured to for distributing
The remaining node of the corporations of cache server.If there are remaining node in complex network, selecting unit 401 is calculated
Unit 403 and control unit 405 are directed to remaining node and execute the processing for marking off the corporations for distributing cache server.
In accordance with an alternative illustrative embodiment of the present invention, it if the sum of calculated flow is less than first threshold, controls
The start node and shrinkable node can be merged into dummy node by unit 405.At this point, control unit 405 can determine complexity
With the presence or absence of the remaining node for being not configured to the corporations for distributing cache server in network.If it is determined that complex network
In there are remaining node, then dummy node is set start node by control unit 405, and control selections unit 401 is from surplus
Select the neighbor node of the start node of setting as shrinkable node in remaining node.For example, the controllable choosing of control unit 405
Unit 401 is selected to select with the highest node of dummy node similarity of setting as shrinkable node.
That is, selecting unit 401, computing unit 403 and control unit 405 can be held for the node in complex network
Row is for marking off the iterative processing of the corporations for distributing cache server until there is no remaining nodes.
If the sum of calculated flow is less than first threshold and remaining node is not present, control unit 405 can be incited somebody to action
It is incorporated to including each node in dummy node in the corporations adjacent with each node.
Specifically, if including that there is no residues in the case that the sum of flow in dummy node is less than first threshold
Node, control unit 405 can determine including whether the sum of flow of each node in dummy node is less than second threshold.
If including that the sum of flow of each node in dummy node is less than second threshold, control unit 405 can be included within
Each node in dummy node is incorporated to the corporations adjacent with each node.If including each section in dummy node
The sum of flow of point is greater than or equal to second threshold, then the node that control unit 405 can be included in dummy node is set as
For distributing the corporations of cache server.
As described above, by using the method and apparatus of an exemplary embodiment of the present invention, it can be based in network
The capacity of each node adaptively distribute buffer, to be avoided out while guaranteeing the service quality of each node
The phenomenon that existing service redundant.
In addition, other exemplary embodiments can also by medium (for example, computer-readable medium)/on computer can
Code/instruction is read to realize, realizes any of above exemplary embodiment to control at least one processing element.Medium can be with permission
Any medium of storage and/or the transmission of computer-readable code is corresponding.Using including recording medium (such as, magnetic storage medium
(for example, ROM, floppy disk, hard disk etc.) and optical recording medium (for example, CD-ROM or DVD)) and transmission medium (such as, internet biography
Defeated medium) medium example, computer-readable code can be recorded on medium in various ways/transmit.Therefore, medium
Can be according to the such definition for including or carrying signal or information of one or more exemplary embodiments with it is measurable
Structure such as carries the device of bit stream.Medium can also be distributed network, so that computer-readable code is in a distributed manner
Mode is by storage/transmission and execution.In addition, processing element may include processor or computer processor, processing element can be distributed
And/or it is included in single device.
It should be understood that the exemplary embodiments described herein should be only considered with descriptive sense, rather than in order to limit
The purpose of system.The description of feature and aspect in each exemplary embodiment, which should be usually considered, can be used for other examples
Other similar features or aspect in property embodiment.Although describing one or more exemplary embodiments with reference to attached drawing,
It, can but those skilled in the art will appreciate that in the case where not departing from the spirit and scope being defined by the claims
Make various changes in form and details.