CN113296894B - Method and device for planning internal active detection path of cloud network virtual private network - Google Patents
Method and device for planning internal active detection path of cloud network virtual private network Download PDFInfo
- Publication number
- CN113296894B CN113296894B CN202110619375.6A CN202110619375A CN113296894B CN 113296894 B CN113296894 B CN 113296894B CN 202110619375 A CN202110619375 A CN 202110619375A CN 113296894 B CN113296894 B CN 113296894B
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- queue
- virtual
- physical
- machines
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 190
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 18
- 239000000523 sample Substances 0.000 claims description 29
- 230000015654 memory Effects 0.000 claims description 25
- 238000004590 computer program Methods 0.000 claims description 7
- 238000012163 sequencing technique Methods 0.000 claims description 7
- 230000000694 effects Effects 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 12
- 230000006870 function Effects 0.000 description 8
- 238000003745 diagnosis Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000000977 initiatory effect Effects 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000006854 communication Effects 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5077—Logical partitioning of resources; Management or configuration of virtualized resources
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application provides a method and a device for planning an internal active detection path of a cloud network virtual private network, wherein the specific implementation scheme is as follows: determining identification information of a plurality of physical machines and all virtual machines deployed on each physical machine in a cloud network virtual private network; taking each physical machine as a node, and generating a first detection path among a plurality of physical machines in a full interconnection mode according to identification information of all virtual machines deployed on each physical machine; acquiring a residual virtual machine set of each physical machine according to the identification information of all the virtual machines deployed on each physical machine and the identification information of the first virtual machine participating in the first detection path; and generating a second detection path between each second virtual machine and the virtual switch by using a redundant detection path generation algorithm according to the residual virtual machine set of each physical machine. The method and the device achieve the effect that the fault place in the network can be covered by using the detection paths as few as possible.
Description
Technical Field
The application relates to the technical field of computers, in particular to the field of cloud computing, and particularly relates to a method and a device for planning an internal active detection path of a virtual private network of a cloud network.
Background
Cloud networks are composed of a large number of virtual network resources (e.g., virtual routers, virtual switches, etc.) that are located on top of a physical infrastructure network. After applying network virtualization technology, a cloud data center (originally composed of hundreds of thousands of physical servers and thousands of physical switches and routers) may generate millions of Virtual Machines (VMs) and Virtual NICs (network interface controllers), and a large number of Virtual switches and routers.
A Virtual Private network (VPC) is a customized Private network created by a user, two-layer logic isolation is performed between different Private networks, and the user can create and manage Cloud product instances in the Private network created by the user, such as a Cloud server, load balancing, and the like. In order to be able to perform fault diagnosis on the VPC, active detection needs to be initiated inside the VPC to obtain connectivity between virtual machines and possible fault locations, etc. However, a VPC may contain a large number of virtual machines, and initiating active probing between each virtual machine consumes a large amount of resources, which may affect the use of the original network.
Disclosure of Invention
The application provides a method and a device for planning an internal active detection path of a cloud network virtual private network in order to cover a link with a fault in the network by using detection as less as possible.
According to a first aspect of the present application, a method for planning an active detection path inside a cloud network virtual private network is provided, which includes:
determining identification information of a plurality of physical machines and all virtual machines deployed on each physical machine in the cloud network virtual private network;
taking each physical machine as a node, and generating a first detection path among the multiple physical machines in a full interconnection mode according to the identification information of all virtual machines deployed on each physical machine;
acquiring a residual virtual machine set of each physical machine according to the identification information of all the virtual machines deployed on each physical machine and the identification information of the first virtual machine participating in the first detection path; the remaining virtual machine set of each physical machine refers to a set of second virtual machines which do not participate in the first detection path in each physical machine;
and generating a second detection path between each second virtual machine and the virtual switch by using a redundant detection path generation algorithm according to the residual virtual machine set of each physical machine.
The implementation manner of generating the first detection path among the multiple physical machines in a full interconnect manner according to the identification information of all the virtual machines deployed on each physical machine, with each physical machine serving as a node, may include:
taking each physical machine as a node, and obtaining links among the nodes in a full interconnection mode;
according to the identification information of all the virtual machines deployed on each physical machine and the links between the nodes, respectively selecting the identification information of one virtual machine from the identification information of all the virtual machines deployed on the two physical machines corresponding to the link between each node;
and taking the virtual machine corresponding to the identification information of one of the virtual machines as a source end of the current inter-node detection, and taking the virtual machine corresponding to the identification information of the other virtual machine as a destination end of the current inter-node detection, so as to generate the first detection path.
In some embodiments of the present application, generating a second probe path between each of the second virtual machines and a virtual switch using a redundant probe path generation algorithm according to the remaining set of virtual machines of each of the physical machines comprises:
judging whether a target residual virtual machine set meeting preset conditions exists in the residual virtual machine sets or not;
if the target residual virtual machine set exists, putting the target residual virtual machine set into a source queue, and putting other residual virtual machine sets into a destination queue; wherein the other remaining virtual machine sets refer to remaining virtual machine sets except the target remaining virtual machine set among the plurality of remaining virtual machine sets.
If the target residual virtual machine set does not exist, sequentially placing a plurality of residual virtual machine sets into queues with lower queue heights in a source queue and a target queue according to the descending order of the number of elements in each set;
rearranging the order of the elements in the queue with lower height in the source queue and the destination queue according to the height of the source queue and the destination queue;
and sequentially taking out one virtual machine from the source queue and the target queue respectively, and taking the taken out virtual machines as a detection source end and a detection target end respectively to generate a second detection path.
The determining whether a target remaining virtual machine set meeting a preset condition exists in the plurality of remaining virtual machine sets includes:
acquiring the number of elements of each set in the plurality of residual virtual machine sets;
adding the number of elements in each residual virtual machine set to obtain the total number of the residual virtual machines;
subtracting the element number of each residual virtual machine set from the total number of the residual virtual machines to obtain the number of other virtual machines corresponding to each residual virtual machine set;
comparing the element number of the current residual virtual machine set with the number of other virtual machines corresponding to the current residual virtual machine set;
and if the number of elements of the current residual virtual machine set is greater than the number of other virtual machines corresponding to the current residual virtual machine set, taking the current residual virtual machine set as a target residual virtual machine set.
In some embodiments of the present application, said rearranging the order of elements in a higher-level queue of the source queue and the destination queue according to the heights of the source queue and the destination queue includes:
comparing the queue heights of the source queue and the destination queue to obtain a queue with a smaller queue height;
and sequencing the elements in the queue with the smaller queue height in an alternating mode according to different physical machines.
Optionally, in this embodiment of the present application, before the sequentially taking out the identification information of one virtual machine from the source queue and the destination queue, and respectively taking the virtual machine corresponding to the identification information of the virtual machine as a source end and a destination end of detection, the method further includes:
judging whether the absolute value of the height difference between the source queue and the destination queue is less than or equal to 1;
and if the absolute value of the height difference is not less than or equal to 1, putting the top element of the queue with higher height in the source queue and the destination queue into the bottom of the queue with lower height.
According to a second aspect of the present application, there is provided a device for planning an active detection path in a virtual private network of a cloud network, including:
the determining module is used for determining identification information of a plurality of physical machines and all virtual machines deployed on each physical machine in the cloud network virtual private network;
a first generation module, configured to use each physical machine as a node, and generate a first detection path among the multiple physical machines in a full interconnection manner according to identification information of all virtual machines deployed on each physical machine;
an obtaining module, configured to obtain a remaining virtual machine set of each physical machine according to identification information of all virtual machines deployed on each physical machine and identification information of a first virtual machine participating in the first detection path; the remaining virtual machine set of each physical machine refers to a set of second virtual machines which do not participate in the first detection path in each physical machine;
and the second generation module is used for generating a second detection path between each second virtual machine and the virtual switch by using a redundant detection path generation algorithm according to the residual virtual machine set of each physical machine.
In some embodiments of the present application, the first generating module is specifically configured to:
taking each physical machine as a node, and obtaining links among the nodes in a full interconnection mode;
according to the identification information of all the virtual machines deployed on each physical machine and the links between the nodes, respectively selecting the identification information of one virtual machine from the identification information of all the virtual machines deployed on the two physical machines corresponding to the link between each node;
and taking the virtual machine corresponding to the identification information of one of the virtual machines as a source end of the current inter-node detection, and taking the virtual machine corresponding to the identification information of the other virtual machine as a destination end of the current inter-node detection, so as to generate the first detection path.
In an embodiment of the present application, the second generating module is specifically configured to:
judging whether a target residual virtual machine set meeting preset conditions exists in the residual virtual machine sets or not;
if the target residual virtual machine set exists, putting the target residual virtual machine set into a source queue, and putting other residual virtual machine sets into a destination queue; wherein the other remaining virtual machine sets refer to remaining virtual machine sets except the target remaining virtual machine set among the plurality of remaining virtual machine sets.
If the target residual virtual machine set does not exist, sequentially placing a plurality of residual virtual machine sets into queues with lower queue heights in a source queue and a target queue according to the descending order of the number of elements in each set;
rearranging the order of the elements in the queue with lower height in the source queue and the destination queue according to the height of the source queue and the destination queue;
and sequentially taking out one virtual machine from the source queue and the target queue respectively, and taking the taken out virtual machines as a detection source end and a detection target end respectively to generate a second detection path.
In some embodiments of the present application, the second generating module is further configured to:
acquiring the number of elements of each set in the plurality of residual virtual machine sets;
adding the number of elements in each residual virtual machine set to obtain the total number of the residual virtual machines;
subtracting the element number of each residual virtual machine set from the total number of the residual virtual machines to obtain the number of other virtual machines corresponding to each residual virtual machine set;
comparing the element number of the current residual virtual machine set with the number of other virtual machines corresponding to the current residual virtual machine set;
and if the number of elements of the current residual virtual machine set is greater than the number of other virtual machines corresponding to the current residual virtual machine set, taking the current residual virtual machine set as a target residual virtual machine set.
Further, in some embodiments of the present application, the second generating module is further configured to:
comparing the queue heights of the source queue and the destination queue to obtain a queue with a smaller queue height;
and sequencing the elements in the queue with the smaller queue height in an alternating mode according to different physical machines.
Optionally, in some embodiments of the present application, the device for planning an active detection path in a cloud network virtual private network further includes:
a judging module, configured to take out identification information of one virtual machine from each of the source queue and the destination queue in sequence, and judge whether an absolute value of a queue height difference between the source queue and the destination queue is less than or equal to 1 before a virtual machine corresponding to the identification information of the virtual machine is used as a source end and a destination end of detection;
and the adjusting module is used for placing the top element of the queue with higher height in the source queue and the destination queue into the bottom of the queue with lower height when the absolute value of the height difference is not less than or equal to 1.
According to a third aspect of the present application, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the method according to the first aspect of the present application.
According to a fourth aspect of the present application, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of the first aspect of the present application.
According to the technical scheme of the embodiment of the application, the active detection path planning inside the cloud network virtual private network is divided into two stages, the detection paths among the physical machines are generated in a full-interconnection mode, and then the detection paths between the virtual machines and the virtual switch are generated according to the redundant detection path generation algorithm, so that the effect that the fault place in the network can be covered by using the detection paths as few as possible is achieved, resources are saved, and the use of the network cannot be influenced. In addition, the introduction of the residual virtual machine set enables all the virtual machines to participate in detection at least once, so that the network fault link can be covered comprehensively, and the efficiency of detecting, positioning and diagnosing the network fault is further improved.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic diagram of an internal fault of a cloud network virtual private network according to an embodiment of the present application;
fig. 2 is a flowchart of a method for planning an active detection path in a cloud network virtual private network according to an embodiment of the present application;
fig. 3 is a schematic diagram illustrating a first detection path between multiple physical machines generated in a fully interconnected manner according to an embodiment of the present disclosure;
fig. 4 is a flowchart of generating a second detection path according to an embodiment of the present application;
fig. 5 is a flowchart illustrating a method for determining whether a target remaining virtual machine set meeting a preset condition exists according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of generating a second detection path according to an embodiment of the present application;
fig. 7 is a flowchart of another method for generating a second detection path according to an embodiment of the present disclosure;
fig. 8 is a schematic diagram of another embodiment of the present application for generating a second detection path;
fig. 9 is a block diagram of a structure of an active detection path planning apparatus in a cloud network virtual private network according to an embodiment of the present application;
fig. 10 is a block diagram of a structure of another device for planning an active detection path in a virtual private network of a cloud network according to an embodiment of the present application;
FIG. 11 is a block diagram of a computer device provided by an embodiment of the present application;
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
With the rise of Cloud computing, Public Cloud (Public Cloud), which generally refers to a Cloud that can be used by a third party Cloud provider for a user, has been rapidly popularized and developed as a Cloud computing model that provides convenient and secure data sharing services. A Virtual Private network (VPC) is an isolated network environment constructed based on public Cloud, and enterprise users can plan and manage the network environment as needed, for example, select their own IP address ranges, partition network segments, configure routing tables and gateways, etc.
Inside one VPC, due to the adoption of virtualization technology, a plurality of virtual machines are virtualized on each physical machine, and the virtual machines communicate with the outside through the same virtual switch (vSwitch). Therefore, in the communication process between the VM and the VM, as shown in fig. 1, there are two places where there is a possibility of failure, namely, a link between the VM and the vSwitch and a link between a PM (Physical Machine) and the PM. In order to diagnose the VPC failure, active probing needs to be initiated inside the VPC to find connectivity between links and possible failure locations, etc. Since a large number of virtual machines may be included in a VPC, initiating active probing between each virtual machine consumes a large amount of resources, and even affects the use of the original network.
Based on the above problems, the application provides a method and a device for planning an internal active detection path of a cloud network virtual private network, which are used for covering a place where a fault possibly occurs by using as few detections as possible, so that on one hand, the link coverage between physical machines is ensured, and on the other hand, the link coverage between a virtual machine and a virtual switch is ensured.
Fig. 2 is a flowchart of a method for planning an active detection path in a cloud network virtual private network according to an embodiment of the present application. It should be noted that the method for planning the internal active detection path of the cloud network virtual private network according to the embodiment of the present application may be applied to a device for planning the internal active detection path of the cloud network virtual private network according to the embodiment of the present application, and the device may be configured in a computer device. As shown in fig. 2, the method for planning the active detection path in the cloud network virtual private network includes the following steps:
The method for planning the internal active detection path of the cloud network virtual private network is applied to a scene that a certain virtual private network in the cloud network has connectivity problems. That is to say, when a cloud network user reports that a certain virtual private network has connectivity problems, an administrator uses the cloud network virtual private network internal active detection path planning method provided by the present application for the virtual private network to generate a detection path set that needs to be actively detected.
In order to plan the probe path, it is necessary to determine which physical machines exist in the current virtual private network and which virtual machines are deployed in each physical machine. In the embodiment of the application, which virtual machines are deployed in each physical machine is determined by identification information of the virtual machines. The identification information of the virtual machine may be an ID (Identity Document) of the virtual machine, or other information that can uniquely identify each virtual machine, which will be described in this embodiment as an example.
That is, each physical machine is taken as a node, and the link detection between the multiple physical machines is realized in a full interconnection mode, so that the detection path is ensured to cover all links between the multiple physical machines.
Each active detection is sent from one virtual machine to another virtual machine, so that when each physical machine node participates in the detection, one virtual machine needs to be selected from each physical machine as a source end or a destination end of the detection, and a first detection path among a plurality of physical machines is generated.
In this embodiment of the present application, fig. 3 is a schematic diagram of generating a first detection path among multiple physical machines in a fully interconnected manner, and as shown in fig. 3, a specific implementation manner of generating the first detection path may be: taking each physical machine as a node, and obtaining links among the nodes in a full interconnection mode; respectively selecting identification information of one virtual machine from the identification information of all virtual machines deployed on two physical machines corresponding to the link between each node according to the identification information of all virtual machines deployed on each physical machine and the links between the nodes; and taking the virtual machine corresponding to the identification information of one virtual machine as a source end of the current inter-node detection, and taking the virtual machine corresponding to the identification information of the other virtual machine as a destination end of the current inter-node detection, so as to generate the first detection path.
As shown in fig. 3, according to the identification information of all the virtual machines deployed on each physical machine and the links between the nodes, a specific implementation manner of respectively selecting the identification information of one virtual machine from the identification information of all the virtual machines deployed on the two physical machines corresponding to the link between each node may be as follows: sequencing the identification information of all the virtual machines deployed on each physical machine, for example, sequencing the identification information from small to large according to the IDs of the virtual machines; and aiming at the physical machines corresponding to the links among the nodes, sequentially selecting the physical machines according to the virtual machine ID sequence when the virtual machines are selected on each physical machine. Therefore, all virtual machines in each physical machine participate in detection as much as possible to find out more potential faults.
It should be noted that the remaining virtual machine set of each physical machine refers to a set of second virtual machines not participating in the first probe path among each physical machine. The first virtual machine is a virtual machine participating in the first detection path, that is, a virtual machine already participating in active detection. The second virtual machine is a virtual machine which does not participate in the first detection path, namely, a virtual machine which does not participate in active detection.
That is, before planning a probe path of a link between a virtual machine and a virtual switch, it needs to be determined which virtual machines have participated in active probing and which virtual machines have not participated in active probing among all the virtual machines deployed on each physical machine, and then it will only need to plan a probe path for the virtual machines not participated in active probing, so that the planning of the probe path covers each virtual machine.
In this embodiment of the present application, an implementation manner of obtaining the remaining virtual machine set of each physical machine may be: comparing the identification information of all the virtual machines deployed on each physical machine with the identification information of the first virtual machine participating in the first detection path; finding out virtual machine identification information which is the same as the identification information of the first virtual machine of the first detection path in the identification information of all the virtual machines deployed on each physical machine; removing the same virtual machine identification information from the identification information of all the virtual machines deployed on each physical machine; and taking the virtual machines corresponding to the identification information of the rest virtual machines in each physical machine as the rest virtual machine set of each physical machine.
And step 204, generating a second detection path between each second virtual machine and the virtual switch by using a redundant detection path generation algorithm according to the remaining virtual machine set of each physical machine.
That is, next, for the remaining virtual machines not participating in active probing in each physical machine, a probing path between the virtual machine and the virtual switch is planned.
It should be noted that, in the present application, it is assumed that there is no connectivity problem between the virtual machines of the same physical machine, and therefore the source-end virtual machine and the destination-end virtual machine of the second probe path generated according to the redundant probe path generation algorithm cannot be in the same physical machine.
In an embodiment of the present application, a redundant probe path generation algorithm is used to generate a second probe path between each second virtual machine and the virtual switch. Wherein, the redundant detection path generation algorithm aims at: enabling all remaining virtual machines to participate in the detection at least once; the detection paths are reduced as much as possible; probes are made to span as different physical machines as possible to discover more potential faults.
According to the method for planning the internal active detection path of the cloud network virtual private network, the internal active detection path of the cloud network virtual private network is planned into two stages, the detection paths among the physical machines are generated in a full-interconnection mode, the detection paths between the virtual machines and the virtual switch are generated according to the redundant detection path generation algorithm, the effect that the fault place in the network can be covered by using the detection paths as few as possible is achieved, resources are saved, and the use of the network cannot be influenced. In addition, the introduction of the residual virtual machine set enables all the virtual machines to participate in detection at least once, so that the network fault link can be covered comprehensively, and the efficiency of detecting, positioning and diagnosing the network fault is further improved.
In order to implement the detailed description of the method for planning the active detection path inside the cloud network virtual private network provided by the present application, a further embodiment is provided next for a method for generating a second detection path between each second virtual machine and the virtual switch.
Fig. 4 is a flowchart of generating a second probe path between each second virtual machine and the virtual switch according to an embodiment of the present application. As shown in fig. 4, generating the second detection path includes the following steps:
It can be understood that if the number of elements in a certain remaining virtual machine set is large, that is, the number of virtual machines not participating in active detection in virtual machines deployed by a certain physical machine is large, so that it is necessary to perform active detection for fault diagnosis on virtual machines in the remaining virtual machine set corresponding to all other physical machines, in order to reduce the amount of computation, special processing is required for planning a detection path between a second virtual machine in the remaining virtual machine set and a virtual switch, and therefore, before generating a second planned path, it is first necessary to determine whether a remaining virtual machine set of the type exists.
As an example, fig. 5 is a flowchart for determining whether there is a target remaining virtual machine set that meets a preset condition according to an embodiment of the present application. As shown in fig. 5, an implementation of this determination may include:
That is, the total number of the remaining virtual machines is subtracted from the number of elements of each remaining virtual machine set, so that each remaining virtual machine set obtains the number of other virtual machines, which is the number of virtual machines that have not participated in active detection except the virtual machines in its own remaining virtual machine set.
And 505, if the number of elements of the current remaining virtual machine set is greater than the number of other virtual machines corresponding to the current remaining virtual machine set, taking the current remaining virtual machine set as a target remaining virtual machine set.
It can be understood that, if the number of elements in the current remaining virtual machine set is greater than the number of other virtual machines corresponding to the current remaining virtual machine set, that is, if the number of virtual machines in the current remaining virtual machine set is greater than the sum of the numbers of all the remaining virtual machines that have not participated in active detection, the virtual machines in the current remaining virtual machine set need to perform active detection with each of the remaining virtual machines that have not participated in active detection, so as to meet the purpose that each virtual machine participates in detection at least once. At this time, the set of remaining virtual machines is set as a target set of remaining virtual machines.
The other remaining virtual machine set refers to a remaining virtual machine set except for the target remaining virtual machine set in the plurality of remaining virtual machine sets. Since the virtual machine in the target remaining virtual machine set needs to actively detect with the virtual machine in each other remaining virtual machine set, the target remaining virtual machine set can be directly placed in the source queue, and the other remaining virtual machine sets are placed in the destination queue, so that the three targets of the redundant detection path generation algorithm can be met.
And step 403, if the target remaining virtual machine set does not exist, sequentially placing a plurality of remaining virtual machine sets into queues with lower queue heights in the source queue and the destination queue according to the descending order of the number of elements in each set.
Fig. 6 is a schematic diagram of generating a second detection path according to an embodiment of the present application. As shown in fig. 6, in the embodiment of the present application, a plurality of remaining virtual machine sets are arranged in a descending order according to the number of elements in each set, and the virtual machines in the corresponding remaining virtual machine sets are sequentially taken out according to the sorting and put into the queues with lower queue heights in the source queue and the destination queue, so as to reduce the queue height difference between the source queue and the destination queue, thereby reducing the number of detection paths as much as possible.
In order to avoid the situation that multiple detections are concentrated between a certain pair of physical machines when the detection paths generated by the virtual machines in the source queue and the destination queue are in one-to-one correspondence, as shown in fig. 6, in the embodiment of the present application, the order of the elements in the queues with lower heights in the source queue and the destination queue is rearranged, so that the detection paths span different physical machines as much as possible, thereby facilitating to discover more potential faults. In addition, the low-height queues are rearranged, so that the adjustment range can be reduced, the calculation amount required by rearrangement is reduced, and the path planning efficiency is improved.
As an example, the implementation of rearranging the order of elements in a lower-level queue in the source queue and the destination queue may be: comparing the queue heights of the source queue and the destination queue to obtain a queue with a smaller queue height; and sequencing the elements in the queue with the smaller queue height in an alternating mode according to different physical machines. The sorting according to the alternative manner of the different physical machines may be understood as alternately arranging the virtual machines of the different physical machines in the queue, so that the adjacent elements in the queue are not the virtual machines of the same physical machine as much as possible.
As shown in fig. 6, the virtual machines in the source queue and the destination queue are directly paired in sequence according to the sequence in the current queue, one of the paired virtual machines serves as a source end of detection, and the other serves as a destination end of detection, so as to implement a detection path of a link between each second virtual machine and the virtual switch. It should be noted that, if the heights of the source queue and the destination queue are not consistent, where the queues with higher heights are paired in sequence, an unpaired virtual machine may exist, and at this time, a virtual machine may be randomly selected from the queues with lower heights to be paired with the virtual machine.
According to the method for planning the active detection path in the cloud network virtual private network, whether a target residual virtual machine set exists in all residual virtual machine sets or not is judged, and the planning of the second detection path is executed according to the judgment result, so that the resource waste caused by unnecessary calculation during path division is reduced. In addition, all the remaining virtual machine sets are sequentially placed into queues with lower queue heights in the source queue and the destination queue according to the descending order of the number of elements in each set, so that the number of detection paths can be effectively reduced, and the consumption of resources is saved. In addition, the sequence of the elements in the lower-level queues in the source queue and the destination queue is rearranged, so that the detection can span different physical machines as much as possible, the situation that multiple detections are concentrated between a certain pair of physical machines is avoided, and more potential faults are found.
In order to further optimize path planning and minimize the number of detection paths, the present application provides another method for planning an active detection path in a cloud network virtual private network based on the above embodiments, and fig. 7 is a flowchart for generating a second detection path according to a redundant detection path generation algorithm in the method provided by the embodiments of the present application. As shown in fig. 7, an implementation of generating the second detection path according to the redundant detection path generation algorithm further includes:
It can be understood that, for the case that the target remaining virtual machine set does not exist in the remaining virtual machine set, the smaller the queue height difference between the source queue and the destination queue, the smaller the number of corresponding detection paths will be.
In this embodiment of the present application, in order to reduce the number of probe paths as much as possible, it is first required to determine whether a queue height difference between a source queue and a destination queue is already minimum, that is, whether an absolute value of the queue height difference between the source queue and the destination queue is less than or equal to 1. If the absolute value of the height difference between the two queues is less than or equal to 1, then the step 707 is executed directly without continuing optimization; if the absolute value of the height difference between the two queues is greater than 1, it indicates that the height difference between the current source queue and the current destination queue is not the minimum, and there is an optimized space, and step 706 needs to be performed to reduce the height difference of the queues.
In step 706, if the absolute value of the height difference is not less than or equal to 1, the top element of the higher queue in the source queue and the destination queue is placed at the bottom of the lower queue.
It is understood that, when the absolute value of the height difference between the source queue and the destination queue is not less than or equal to 1, the neck element of the higher queue of the original queue and the destination queue is placed at the bottom of the lower queue, so that the height of the higher queue is reduced by 1 and the height of the lower queue is increased by 1, thereby reducing the height difference. In addition, the neck elements of the queue with higher height are placed at the bottom of the queue with lower height, so that the situation that different virtual machines of the same physical machine perform detection is avoided, and the detection can span more physical machines.
In this embodiment of the present application, a specific implementation manner of placing the top element of the higher queue in the source queue and the destination queue into the bottom of the lower queue may be: comparing the heights of the source and destination queues, the top element of the higher-height queue is moved to the bottom of the lower-height queue, and then all elements of the lower queue are moved up by one element position. It should be noted that, if the absolute value of the height difference between the two queues is greater than 2, the two queues need to move many times to satisfy the condition of the minimum height difference, in this embodiment of the present application, after the step 706 is completed, the step 705 is continuously executed, and until the absolute value of the height difference between the two queues is less than or equal to 1, the step 707 is executed again.
To make the above implementation more intuitive, fig. 8 will be described as an example. As shown in fig. 8, the original number of probing paths is 8, the height difference between the two queues is 2, the number of probing paths obtained by moving the top element of the queue with the higher height to the bottom of the queue with the lower height and moving all the elements of the queue with the lower height one element bit upwards is reduced to 7, and the height difference between the two queues is reduced to 0.
And 707, sequentially fetching a virtual machine from the source queue and the destination queue, and generating a second detection path by using the fetched virtual machines as a source end and a destination end of detection.
It should be noted that, in the embodiment of the present application, the implementation manners of steps 701 to 704 in fig. 7 are consistent with the implementation manners of steps 401 to 404 in fig. 4, and the implementation manner of step 707 in fig. 7 is consistent with the implementation manner of step 405 in fig. 4, which is not described herein again.
According to the method for planning the active detection path in the cloud network virtual private network, before the second detection path is generated, the judgment of the height difference between the source queue and the destination queue is increased aiming at the condition that the target residual virtual machine set does not exist in the residual virtual machine set. And if the absolute value of the height difference is greater than 1, putting the top element of the queue with higher height in the source queue and the destination queue into the bottom of the queue with lower height, and generating a second detection path until the absolute value of the height difference of the two queues is less than or equal to 1. Through the adjustment of the queue height, the number of detection paths is further reduced, and meanwhile, the consumption of resources can be saved. In addition, the top element of the queue with higher height in the source queue and the destination queue is placed at the bottom of the queue with lower height, so that detection can further span different physical machines, more potential faults can be found, and the fault diagnosis efficiency of active detection is improved.
In order to implement the above embodiments, the present application provides a device for planning an active detection path in a virtual private network of a cloud network.
Fig. 9 is a block diagram of a structure of an active detection path planning apparatus in a cloud network virtual private network according to an embodiment of the present application. As shown in fig. 9, the apparatus includes:
a determining module 910, configured to determine identification information of a plurality of physical machines and all virtual machines deployed on each physical machine in a cloud network virtual private network;
a first generating module 920, configured to use each physical machine as a node, and generate a first detection path among multiple physical machines in a full interconnection manner according to identification information of all virtual machines deployed on each physical machine;
an obtaining module 930, configured to obtain a remaining virtual machine set of each physical machine according to the identification information of all the virtual machines deployed on each physical machine and the identification information of the first virtual machine participating in the first detection path; the remaining virtual machine set of each physical machine refers to a set of second virtual machines which do not participate in the first detection path in each physical machine;
a second generating module 940, configured to generate a second probe path between each second virtual machine and the virtual switch by using a redundant probe path generation algorithm according to the remaining virtual machine set of each physical machine.
In some embodiments of the present application, the first generating module 920 is specifically configured to:
taking each physical machine as a node, and obtaining links among the nodes in a full interconnection mode;
respectively selecting identification information of one virtual machine from the identification information of all virtual machines deployed on two physical machines corresponding to the link between each node according to the identification information of all virtual machines deployed on each physical machine and the links between the nodes;
and taking the virtual machine corresponding to the identification information of one virtual machine as a source end of the current inter-node detection, and taking the virtual machine corresponding to the identification information of the other virtual machine as a destination end of the current inter-node detection, so as to generate a first detection path.
In this embodiment of the application, the second generating module 940 is specifically configured to:
judging whether a target residual virtual machine set meeting preset conditions exists in the residual virtual machine sets;
if the target residual virtual machine set exists, putting the target residual virtual machine set into a source queue, and putting other residual virtual machine sets into a target queue; the other remaining virtual machine set refers to a remaining virtual machine set except for the target remaining virtual machine set in the plurality of remaining virtual machine sets.
If the target residual virtual machine set does not exist, sequentially placing a plurality of residual virtual machine sets into queues with lower queue heights in the source queue and the target queue according to the descending order of the number of elements in each set;
rearranging the sequence of the elements in the queues with lower heights in the source queue and the destination queue according to the heights of the source queue and the destination queue;
and sequentially taking out one virtual machine from the source queue and the destination queue respectively, and taking the virtual machine taken out as a detection source end and a detection destination end respectively to generate a second detection path.
In some embodiments of the present application, the second generation module 940 is further configured to:
acquiring the number of elements of each set in a plurality of residual virtual machine sets;
adding the number of elements in each residual virtual machine set to obtain the total number of the residual virtual machines;
subtracting the element number of each residual virtual machine set from the total number of the residual virtual machines to obtain the number of other virtual machines corresponding to each residual virtual machine set;
comparing the element number of the current residual virtual machine set with the number of other virtual machines corresponding to the current residual virtual machine set;
and if the number of elements of the current residual virtual machine set is larger than the number of other virtual machines corresponding to the current residual virtual machine set, taking the current residual virtual machine set as a target residual virtual machine set.
Furthermore, in some embodiments of the present application, the second generating module 940 is further configured to:
comparing the queue heights of the source queue and the destination queue to obtain a queue with a smaller queue height;
and sequencing the elements in the queue with the smaller queue height in an alternating mode according to different physical machines.
According to the cloud network virtual private network internal active detection path planning device provided by the embodiment of the application, the cloud network virtual private network internal active detection path planning is divided into two stages, detection paths among a plurality of physical machines are generated in a full-interconnection mode, and then the detection paths between the virtual machines and the virtual switch are generated according to a redundant detection path generation algorithm, so that the effect that a fault place in a network can be covered by using as few detection paths as possible is achieved, resources are saved, and the use of the network cannot be influenced. In addition, the introduction of the residual virtual machine set enables all the virtual machines to participate in detection at least once, so that the network fault link can be covered comprehensively, and the efficiency of detecting, positioning and diagnosing the network fault is further improved.
In order to reduce the number of detection paths as much as possible, the application provides another active detection path planning device in a cloud network virtual private network.
Fig. 10 is a block diagram of a structure of another device for planning an active detection path in a cloud network virtual private network according to an embodiment of the present application. As shown in fig. 10, the apparatus further includes:
a determining module 1050, configured to sequentially take out identification information of one virtual machine from each of the source queue and the destination queue, and determine whether an absolute value of a queue height difference between the source queue and the destination queue is less than or equal to 1 before the virtual machine corresponding to the identification information of the virtual machine is used as the source end and the destination end of the detection;
the adjusting module 1060 is configured to, when the absolute value of the height difference is not less than or equal to 1, place the top element of the higher queue in the source queue and the destination queue into the bottom of the lower queue.
It should be noted that 1010-1040 in fig. 10 have the same functional structures as 910-940 in fig. 9, and the description thereof is omitted.
According to the device for planning the active detection path in the cloud network virtual private network, a judgment module and an adjustment module are added, and the judgment module and the adjustment module are used for judging the height difference between a source queue and a destination queue according to the condition that a target residual virtual machine set does not exist in the residual virtual machine set before a second detection path is generated. And if the absolute value of the height difference is greater than 1, putting the top element of the queue with higher height in the source queue and the destination queue into the bottom of the queue with lower height, and generating a second detection path until the absolute value of the height difference of the two queues is less than or equal to 1. Through the adjustment of the queue height, the number of detection paths is further reduced, and meanwhile, the consumption of resources can be saved. In addition, the top element of the queue with higher height in the source queue and the destination queue is placed at the bottom of the queue with lower height, so that detection can further span different physical machines, more potential faults can be found, and the fault diagnosis efficiency of active detection is improved.
It should be noted that, regarding the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated herein.
To implement the above embodiments, the present application also provides a computer device and a computer-readable storage medium.
Fig. 11 is a block diagram of a computer device for implementing active probe path planning inside a cloud network virtual private network according to an embodiment of the present application. Computer devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 11, the computer apparatus includes: memory 1110, processor 1120, and computer programs 1130 stored on the memory and executable on the processor. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system).
The memory 1110 is a non-transitory computer-readable storage medium, and can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to the method for planning a path for active probing inside a cloud network virtual private network in the embodiment of the present application (for example, the determining module 910, the first generating module 920, the obtaining module 930, and the second generating module 940 shown in fig. 9). The processor 1120 executes non-transitory software programs, instructions and modules stored in the memory 1120, so as to execute various functional applications and data processing of the server, that is, implement the method for planning active detection paths inside the cloud network virtual private network in the above method embodiment.
The memory 1110 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of a computer device used in the cloud network virtual private network internal active probe path planning method, and the like. Further, the memory 1110 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 1110 optionally includes memory remotely located from processor 1120, which may be connected over a network to an electronic device to implement a cloud network virtual private network internal active probe path planning method. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The computer device for the method for planning the active detection path in the cloud network virtual private network may further include: an input device 1140 and an output device 1150. The processor 1120, the memory 1110, the input device 1140 and the output device 1150 may be connected by a bus or other means, as exemplified by the bus connection in fig. 11.
The input device 1140 may receive input numeric or character information and generate key signal inputs related to user settings and function control of an electronic device to implement the active probe path planning method inside the cloud network virtual private network, such as an input device of a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointing stick, one or more mouse buttons, a track ball, a joystick, etc. The output devices 1150 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.
Claims (8)
1. A planning method for an active detection path in a cloud network virtual private network is characterized by comprising the following steps:
determining identification information of a plurality of physical machines and all virtual machines deployed on each physical machine in the cloud network virtual private network;
taking each physical machine as a node, and generating a first detection path among the multiple physical machines in a full interconnection mode according to the identification information of all virtual machines deployed on each physical machine;
acquiring a residual virtual machine set of each physical machine according to identification information of all virtual machines deployed on each physical machine and identification information of a first virtual machine participating in the first detection path; the remaining virtual machine set of each physical machine refers to a set of second virtual machines which do not participate in the first detection path in each physical machine;
generating a second detection path between each second virtual machine and a virtual switch by using a redundant detection path generation algorithm according to the residual virtual machine set of each physical machine; wherein the generating a second probe path between each second virtual machine and a virtual switch using a redundant probe path generation algorithm according to the remaining set of virtual machines of each physical machine comprises:
judging whether a target residual virtual machine set meeting preset conditions exists in the residual virtual machine sets or not; the number of elements of the target residual virtual machine set is greater than the number of other virtual machines corresponding to the target residual virtual machine set, and the target residual virtual machine set meets the preset condition; the number of other virtual machines corresponding to the target remaining virtual machine set is the number of the remaining second virtual machines which do not participate in the first detection path except the second virtual machine in the target remaining virtual machine set;
if the target residual virtual machine set exists, putting the target residual virtual machine set into a source queue, and putting other residual virtual machine sets into a destination queue; wherein the other remaining virtual machine sets refer to remaining virtual machine sets except the target remaining virtual machine set in the plurality of remaining virtual machine sets;
if the target residual virtual machine set does not exist, sequentially placing a plurality of residual virtual machine sets into queues with lower queue heights in a source queue and a target queue according to the descending order of the number of elements in each set;
rearranging the order of the elements in the queue with lower height in the source queue and the destination queue according to the height of the source queue and the destination queue;
and sequentially taking out one virtual machine from the source queue and the target queue respectively, and taking the taken out virtual machines as a detection source end and a detection target end respectively to generate a second detection path.
2. The method according to claim 1, wherein taking each of the physical machines as a node, generating a first probe path among the plurality of physical machines in a fully-interconnected manner according to identification information of all virtual machines deployed on each of the physical machines, includes:
taking each physical machine as a node, and obtaining links among the nodes in a full interconnection mode;
according to the identification information of all the virtual machines deployed on each physical machine and the links between the nodes, respectively selecting the identification information of one virtual machine from the identification information of all the virtual machines deployed on the two physical machines corresponding to the link between each node;
and taking the virtual machine corresponding to the identification information of one of the virtual machines as a source end of the current inter-node detection, and taking the virtual machine corresponding to the identification information of the other virtual machine as a destination end of the current inter-node detection, so as to generate the first detection path.
3. The method according to claim 1, wherein the determining whether a target remaining virtual machine set meeting a preset condition exists in the plurality of remaining virtual machine sets comprises:
acquiring the number of elements of each set in the plurality of residual virtual machine sets;
adding the number of elements in each residual virtual machine set to obtain the total number of the residual virtual machines;
subtracting the element number of each residual virtual machine set from the total number of the residual virtual machines to obtain the number of other virtual machines corresponding to each residual virtual machine set;
comparing the element number of the current residual virtual machine set with the number of other virtual machines corresponding to the current residual virtual machine set;
and if the number of elements of the current residual virtual machine set is greater than the number of other virtual machines corresponding to the current residual virtual machine set, taking the current residual virtual machine set as a target residual virtual machine set.
4. The method of claim 1, wherein said rearranging the order of elements in a lower-level queue of the source queue and the destination queue according to the heights of the source queue and the destination queue comprises:
comparing the queue heights of the source queue and the destination queue to obtain a queue with a smaller queue height;
and sequencing the elements in the queue with the smaller queue height in an alternating mode according to different physical machines.
5. The method according to claim 1, wherein before the sequentially fetching identification information of one virtual machine from each of the source queue and the destination queue and respectively taking a virtual machine corresponding to the identification information of the virtual machine as a source end and a destination end of the probe, the method further comprises:
judging whether the absolute value of the height difference between the source queue and the destination queue is less than or equal to 1;
and if the absolute value of the height difference is not less than or equal to 1, putting the top element of the queue with higher height in the source queue and the destination queue into the bottom of the queue with lower height.
6. A planning device for an active detection path in a cloud network virtual private network is characterized by comprising:
the determining module is used for determining identification information of a plurality of physical machines and all virtual machines deployed on each physical machine in the cloud network virtual private network;
a first generation module, configured to use each physical machine as a node, and generate a first detection path among the multiple physical machines in a full interconnection manner according to identification information of all virtual machines deployed on each physical machine;
an obtaining module, configured to obtain a remaining virtual machine set of each physical machine according to identification information of all virtual machines deployed on each physical machine and identification information of a first virtual machine participating in the first detection path; the remaining virtual machine set of each physical machine refers to a set of second virtual machines which do not participate in the first detection path in each physical machine;
a second generation module, configured to generate, according to a remaining virtual machine set of each physical machine, a second probe path between each second virtual machine and the virtual switch by using a redundant probe path generation algorithm; wherein the second generation module is specifically configured to:
judging whether a target residual virtual machine set meeting preset conditions exists in the residual virtual machine sets or not; the number of elements of the target residual virtual machine set is greater than the number of other virtual machines corresponding to the target residual virtual machine set, and the target residual virtual machine set meets the preset condition; the number of other virtual machines corresponding to the target remaining virtual machine set is the number of the remaining second virtual machines which do not participate in the first detection path except the second virtual machine in the target remaining virtual machine set;
if the target residual virtual machine set exists, putting the target residual virtual machine set into a source queue, and putting other residual virtual machine sets into a destination queue; wherein the other remaining virtual machine sets refer to remaining virtual machine sets except the target remaining virtual machine set in the plurality of remaining virtual machine sets;
if the target residual virtual machine set does not exist, sequentially placing a plurality of residual virtual machine sets into queues with lower queue heights in a source queue and a target queue according to the descending order of the number of elements in each set;
rearranging the order of the elements in the queue with lower height in the source queue and the destination queue according to the height of the source queue and the destination queue;
and sequentially taking out one virtual machine from the source queue and the target queue respectively, and taking the taken out virtual machines as a detection source end and a detection target end respectively to generate a second detection path.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of active probe path planning within a cloud network virtual private network as claimed in any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the cloud network virtual private network internal active probe path planning method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110619375.6A CN113296894B (en) | 2021-06-03 | 2021-06-03 | Method and device for planning internal active detection path of cloud network virtual private network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110619375.6A CN113296894B (en) | 2021-06-03 | 2021-06-03 | Method and device for planning internal active detection path of cloud network virtual private network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113296894A CN113296894A (en) | 2021-08-24 |
CN113296894B true CN113296894B (en) | 2022-03-04 |
Family
ID=77326983
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110619375.6A Active CN113296894B (en) | 2021-06-03 | 2021-06-03 | Method and device for planning internal active detection path of cloud network virtual private network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113296894B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114465750B (en) * | 2021-09-28 | 2023-02-03 | 北京卫达信息技术有限公司 | Network topology confusion virtual path creating method, device, terminal and system |
CN114363259B (en) * | 2021-12-30 | 2023-12-08 | 中国光大银行股份有限公司 | Path detection system and path detection method for overlay network |
CN115314390B (en) * | 2022-06-23 | 2023-05-16 | 清华大学 | Cloud computing network measurement planning system and method supporting multiple modes |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104883300A (en) * | 2015-04-17 | 2015-09-02 | 杭州华三通信技术有限公司 | Message transmission method and device |
CN106789537A (en) * | 2017-01-20 | 2017-05-31 | 网宿科技股份有限公司 | A kind of VPN construction method and system |
CN112702330A (en) * | 2020-12-21 | 2021-04-23 | 网络通信与安全紫金山实验室 | Lightweight in-band network telemetry method and device for Overlay network and storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11184271B2 (en) * | 2017-04-06 | 2021-11-23 | At&T Intellectual Property I, L.P. | Network service assurance system |
-
2021
- 2021-06-03 CN CN202110619375.6A patent/CN113296894B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104883300A (en) * | 2015-04-17 | 2015-09-02 | 杭州华三通信技术有限公司 | Message transmission method and device |
CN106789537A (en) * | 2017-01-20 | 2017-05-31 | 网宿科技股份有限公司 | A kind of VPN construction method and system |
CN112702330A (en) * | 2020-12-21 | 2021-04-23 | 网络通信与安全紫金山实验室 | Lightweight in-band network telemetry method and device for Overlay network and storage medium |
Non-Patent Citations (3)
Title |
---|
Fine-Grained Cloud Resource Provisioning for;Hui Yu;《IEEE》;20200930;全文 * |
GroupNavigationforGuidedToursinDistributedVirtualEnvironments;TimWeissker;《IEEE》;20210531;全文 * |
Network-Based Secret Communication;Johanna Ullrich;《IEEE》;20171126;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113296894A (en) | 2021-08-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113296894B (en) | Method and device for planning internal active detection path of cloud network virtual private network | |
Herker et al. | Data-center architecture impacts on virtualized network functions service chain embedding with high availability requirements | |
US8732699B1 (en) | Migrating virtual machines between physical machines in a define group | |
US9753713B2 (en) | Coordinated upgrades in distributed systems | |
US9722859B2 (en) | Evaluation of field replaceable unit dependencies and connections | |
JP2019523949A (en) | Architecture that dynamically scales network security microservices based on load | |
US10389575B2 (en) | Traffic migration based on traffic flow and traffic path characteristics | |
CN108777640B (en) | Server detection method, device, system and storage medium | |
US11941406B2 (en) | Infrastructure (HCI) cluster using centralized workflows | |
US10819618B1 (en) | Network testing system | |
US20210373971A1 (en) | Cross-cluster load balancer | |
KR102036731B1 (en) | System and method for cluster placement of virtualization network functions | |
US9110861B2 (en) | Managing host computing devices with a host control component | |
US9547575B2 (en) | Managing host computing devices | |
Liu et al. | Availability-aware virtual cluster allocation in bandwidth-constrained datacenters | |
Alaluna et al. | Secure multi-cloud network virtualization | |
JP2022088587A (en) | Load distribution system, method, device, electronic apparatus, and storage medium | |
CN113872997A (en) | Container group POD reconstruction method based on container cluster service and related equipment | |
CN111752180B (en) | Controlling paths in a network via a centralized controller or network device | |
Gong et al. | An efficient and coordinated mapping algorithm in virtualized SDN networks | |
Moualla et al. | Online robust placement of service chains for large data center topologies | |
CN111756635B (en) | Method for network planning, network planning device and computer-readable medium | |
US11252034B1 (en) | Generating candidate links and candidate paths before selecting links for an optimized optical network plan | |
US20230222110A1 (en) | Selecting interfaces for device-group identifiers | |
US11909818B2 (en) | Reaching a quorum with a number of master nodes |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |