Method and device for expanding virtual network function
Technical Field
The embodiment of the invention relates to a network function virtualization technology, in particular to a method and a device for capacity expansion of a virtual network function.
Background
Network Functions Virtualization (NFV) refers to a software processing technology that uses general hardware and Virtualization technologies to carry multiple Functions. Under the NFV technical framework, an NFV service Network may be decomposed into a group of Virtual Network Functions (VNF) and Virtual Network Function Links (VNFL), where the VNF is a virtualized entity with a Network Function, for example: the VNF has a Mobility Management Entity (MME) function, and is a virtual MME. A VNF may be decomposed into a set of network virtualization function components (VNFCs), which are all loaded on a corresponding Virtual Machine (VM).
In a VNFC instantiation process (where VNFCs are deployed on and run on VMs, referred to as a VNFC instance, that is, a process of instantiating the VNFCs), information such as infrastructure resources and an operating system of a VM is specified by a Virtualization Deployment Unit (VDU), where the infrastructure resources of a VM may specifically include resources such as a Central Processing Unit (CPU), a memory, and a network. The VNF is sensitive to traffic variation, and when the traffic of the VNF changes, the VNFC instance needs to be timely extended to ensure the quality of service. In the prior art, each VNF service corresponds to a fixed VDU, and the allocation of infrastructure resources of VMs in the VDU is manually determined in advance, and when the traffic volume of the VNF service changes, the VNFC instance needs to be extended according to the VDU corresponding to the VNF service to meet the service requirement.
However, when a VNF service changes and a VDU corresponding to the VNF service needs to be used to expand a VNFC instance, it is easy to cause that the configuration amount of infrastructure resources of a VM specified in the VDU is much larger than the resource usage amount of the VNF when the service is actually running, thereby causing waste of infrastructure resources of the VM.
Disclosure of Invention
Embodiments of the present invention provide a method and an apparatus for expanding a virtual network function, which can not only meet resource requirements of a VNF service, but also do not cause a waste of infrastructure resources of a VM.
In a first aspect, an embodiment of the present invention provides a method for capacity expansion of a virtual network function VNF, where the method includes:
determining VM infrastructure resources required by the VNF during operation according to the resource load of a VM executing a service in the VNF and VM infrastructure resource information in a first VDU in a VNFD file of a virtual network descriptor; wherein the first VDU is a VDU currently corresponding to the VNF;
according to the VM infrastructure resource information in each VDU in the VNFD file and the VM infrastructure resources required by the VNF during operation, determining a second VDU with the largest matching degree with the VM infrastructure resources required by the VNF during operation from all VDUs of the VNFD file;
and expanding the volume of the VNF according to the second VDU.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the expanding the capacity of the VNF according to the second VDU specifically includes:
judging whether the matching degree between the VM infrastructure resources in the second VDU and the VM infrastructure resources required by the VNF in operation is larger than or equal to a preset threshold value or not;
if so, expanding the capacity of the VNF according to the second VDU;
if not, when the VNFD file is initialized, the volume of the VNF is expanded through a VDU corresponding to the VNF in the VNFD file, and a new VDU is created in the VNFD file through the VNFD manager.
With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the determining, according to the VM infrastructure resource information in each VDU in the VNFD file, a second VDU that has a maximum matching degree with the VM infrastructure resources required by the VNF during running from all VDUs of the VNFD file specifically includes:
acquiring a first vector according to the resource load of the VM executing the service in the VNF and the VM infrastructure resource information in the first VDU;
acquiring a second vector according to the VM infrastructure resource information in each VDU in the VNFD file;
obtaining the matching degree between the first vector and each second vector;
and taking the VDU corresponding to the second vector with the maximum matching degree as a second VDU.
With reference to the first possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the creating, by the VNFD manager, a new VDU in the VNFD file specifically includes:
sending a VDU creation request to a network function virtualization orchestrator NFVO; the VDU creation request carries VM infrastructure resource information required by the VNF during operation, and is used to request the NFVO to create a new VDU after determining that the NFVO needs to create the new VDU, where the NFVO instructs the VNFD manager to create the new VDU in the VNFD file according to the VM infrastructure resource information required by the VNF during operation.
With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the expanding the capacity of the VNF according to the second VDU specifically includes:
sending a capacity expansion request to the NFVO according to the second VDU; the capacity expansion request comprises the quantity of VMs required by capacity expansion and infrastructure resource information of the VMs required by the capacity expansion;
receiving a capacity expansion instruction sent by the NFVO; the capacity expansion instruction carries resource information distributed by the NFVO for capacity expansion of the VNF according to the capacity expansion request;
and creating and starting a VM required for capacity expansion according to the capacity expansion instruction.
In a second aspect, an embodiment of the present invention provides a device for capacity expansion of a virtual network function VNF, including:
a determining module, configured to determine, according to a resource load of a VM that executes a service in the VNF and VM infrastructure resource information in a first VDU in a virtual network descriptor VNFD file, a VM infrastructure resource required by the VNF when running; wherein the first VDU is a VDU currently corresponding to the VNF;
a matching module, configured to determine, according to the VM infrastructure resource information in each VDU in the VNFD file and the VM infrastructure resources required by the VNF during runtime, a second VDU with a largest matching degree with the VM infrastructure resources required by the VNF during runtime from all VDUs in the VNFD file;
and the capacity expansion module is used for expanding the capacity of the VNF according to the second VDU.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the capacity expansion module is specifically configured to determine whether a matching degree between a VM infrastructure resource in the second VDU and a VM infrastructure resource required by the VNF during running is greater than or equal to a preset threshold; if so, the capacity expansion module expands the capacity of the VNF according to the second VDU; if not, when the capacity expansion module initializes according to the VNFD file, a VDU corresponding to the VNF in the VNFD file expands the VNF, and a new VDU is created in the VNFD file through the VNFD manager.
With reference to the second aspect or the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the matching module is specifically configured to obtain a first vector according to a resource load of a VM that executes a service in the VNF and VM infrastructure resource information in the first VDU; acquiring a second vector according to the VM infrastructure resource information in each VDU in the VNFD file; obtaining the matching degree between the first vector and each second vector; and taking the VDU corresponding to the second vector with the maximum matching degree as a second VDU.
With reference to the first possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the capacity expansion module is further configured to send a VDU creation request to the network function virtualization orchestrator NFVO; the VDU creation request carries VM infrastructure resource information required by the VNF during operation, and is used to request the NFVO to create a new VDU after determining that the NFVO needs to create the new VDU, where the NFVO instructs the VNFD manager to create the new VDU in the VNFD file according to the VM infrastructure resource information required by the VNF during operation.
With reference to the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the capacity expansion module is further specifically configured to send a capacity expansion request to the NFVO according to the second VDU; the capacity expansion request comprises the quantity of VMs required by capacity expansion and infrastructure resource information of the VMs required by the capacity expansion; the capacity expansion module is further specifically configured to receive a capacity expansion instruction sent by the NFVO, and create and start a VM required for capacity expansion according to the capacity expansion instruction; the capacity expansion instruction carries resource information distributed by the NFVO for capacity expansion of the VNF according to the capacity expansion request.
In the method and apparatus for expanding the volume of the VNF provided in this embodiment, according to the resource load of the VM executing the service in the VNF and the VM infrastructure resource information in the first VDU in the VNFD file, the VM infrastructure resource required by the VNF during the operation is determined, and according to the VM infrastructure resource information in each VDU in the VNFD file and the VM infrastructure resource required by the VNF during the operation, the second VDU with the maximum matching degree with the VM infrastructure resource required by the VNF during the operation is determined from all VDUs in the VNFD file, and the VNF is expanded according to the second VDU, in this embodiment, the VDU configured for the VNF service in advance is no longer used for expansion, but the second VDU that is the closest matching with the VM infrastructure resource required by the VNF during the operation is selected from all VDUs for expansion, so that the configuration amount of the VM infrastructure resource in the VM in the second VDU is most similar to the amount of the VM infrastructure resource required by the VNF during the operation, therefore, the capacity expansion of the VNF is carried out according to the second VDU, so that the resource requirement of VNF service can be met, and the waste of infrastructure resources of the VM cannot be caused.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic application scenario diagram of a VNF capacity expansion method according to an embodiment of the present invention;
fig. 2 is a flowchart of a VNF capacity expansion method according to an embodiment of the present invention;
fig. 3 is a flowchart of a VNF capacity expansion method according to a second embodiment of the present invention;
fig. 4 is a flowchart of a VNF capacity expansion method according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a VNF capacity expansion device according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a device for capacity expansion of a VNF according to a seventh embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic application scenario diagram of a VNF capacity expansion method according to an embodiment of the present invention. As shown in fig. 1, the scenario is implemented based on a cloud platform, and includes multiple VMs 1, a monitor 2, a Virtual Network Descriptor (VNFD) Manager 3, a Network Function Virtualization Orchestrator (NFVO) 4, a Virtual Infrastructure Manager (VIM) 5, and a Virtual Network Function Manager (VNFM). The monitor 2 is responsible for monitoring and collecting resource loads and service loads of each VM forming the VNF, the VNFD manager 3 is used for creating and managing VNFD files, each VNFD file includes a VUD, the NFVO4 is responsible for managing virtual infrastructure resources through the VIM5 to realize a resource orchestration function, the VIM5 is responsible for managing and controlling virtual infrastructure resources such as computing resources, storage resources, network resources, and the like, and the VNFM6 is responsible for lifecycle management of VNF instances.
The method provided by the embodiment of the invention aims to solve the technical problem that in the prior art, when the VNF service is changed, when the VDU corresponding to the VNF service is used for expanding the VNFC instance, the waste of the infrastructure resources of the VM is easily caused.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 2 is a flowchart of a VNF capacity expansion method according to an embodiment of the present invention. The execution subject of this embodiment is VNFM, as shown in fig. 2, the method includes the following steps:
step 101, determining, according to resource load of a VM executing a service in the VNF and VM infrastructure resource information in a first VDU in the VNFD file, a VM infrastructure resource required by the VNF during operation.
And the first VDU is the VDU currently corresponding to the VNF.
In this embodiment, the VNFM may obtain, by the monitor, a resource load of a VM executing a service in the VNF, where the resource load of the VM specifically may include indexes related to computing resources, storage resources, network resources, and the like in basic setting resources of the VM, for example, a utilization rate of a Central Processing Unit (CPU), a memory utilization rate, a bandwidth utilization rate, a disk utilization rate, and the like. The VNFM may also obtain, through the monitor, a Key Performance Indicator (KPI) of a VM executing a service in the VNF, and obtain, from the KPI, a resource load of the VM executing the service in the VNF, where the KPI includes the resource load of the VM executing the service in the VNF and a service load of each VM executing the service in the VNF, and the service load includes an Indicator related to the VNF service, such as a number of users in a current system, a number of sessions, a context number of a Packet Data Protocol (PDP), a database read-write queue length, an access delay, and the like. The value of each index in the KPI can be an instantaneous value, or an average value, a maximum value, a minimum value, a median value and the like in a certain time window.
In this embodiment, the VNFD file includes configuration information describing deployment and management behaviors of the VNF and used for supporting online of the VNF and managing a lifecycle of an instance of the VNF, and also includes other specific instance information and constraint information when the VNF runs. The VNFM acquires a first VDU from the VNFD file, where the first VDU is a VDU currently used for executing a VNF service, the first VDU includes information about VM infrastructure resources allocated to the VNF service and information about an operating system, and the information about VM infrastructure resources allocated to the VNF service may specifically be a set of parameters of infrastructure resources of a VM executing the service in the VNF, such as parameters of a CPU, a memory, a bandwidth, and a hard disk. According to the resource load of the VM executing the service in the VNF and the VM infrastructure resource information allocated to the VNF service in the first VDU, the resource amount of the VM actually used when the VNF service is running can be calculated.
Step 102, according to the VM infrastructure resource information in each VDU in the VNFD file and the VM infrastructure resources required by the VNF during running, determining a second VDU with a maximum matching degree with the VM infrastructure resources required by the VNF during running from all VDUs in the VNFD file.
In this embodiment, the VNFM acquires VM infrastructure resource information in each VDU in the VNFD file, calculates a matching degree between the VM infrastructure resources required by the VNF during running and the VM infrastructure resources in each VDU, and selects a VDU corresponding to the VM infrastructure resource with the largest matching degree as the second VDU.
And 103, expanding the volume of the VNF according to the second VDU.
In this embodiment, after the second VDU is determined, the VNFM performs capacity expansion on the VNF according to the second VDU, and a specific capacity expansion process may use a capacity expansion method of the VNF in the prior art, which is not described herein again.
In the prior art, when a VNF service changes and a VDU corresponding to the VNF service is used to expand a VNFC instance, it is easy to happen that the infrastructure resource allocation amount of a VM specified in the VDU is greater than the resource usage amount of the VNF when the service is actually running, for example, the size of a memory specified in the VDU corresponding to the VNF service is 10G, and when the VNF service is actually executed, under the condition that other resources are fully utilized, a 6G memory meets the requirement, and a remaining 4G memory is in an idle state, thereby causing waste of infrastructure resources of the VM. In this embodiment, the VNFM determines, according to the resource load of the VM performing the service in the VNF and the VM infrastructure resource information in the first VDU in the VNFD file, the VM infrastructure resource required when the VNF operates, and according to the VM infrastructure resource information in each VDU in the VNFD file and the VM infrastructure resource required when the VNF operates, determines, from all VDUs in the VNFD file, the second VDU having the greatest matching degree with the VM infrastructure resource required when the VNF operates, and expands the VNF according to the second VDU, in this embodiment, instead of expanding the VDU configured for the VNF service in advance, the VDU that matches the VM infrastructure resource required when the VNF operates best is selected from all VDUs to expand the volume, so the configuration amount of the VM infrastructure resource in the second VDU is most similar to the VM infrastructure resource amount required when the VNF operates, and thus the VNF is expanded according to the second VDU, the resource requirement of VNF service can be met, and the waste of infrastructure resources of the VM can not be caused.
In the method for expanding the volume of the VNF provided in this embodiment, the VNFM determines, according to the resource load of the VM performing the service in the VNF and the VM infrastructure resource information in the first VDU in the VNFD file, the VM infrastructure resources required by the VNF during the operation, and according to the VM infrastructure resource information in each VDU in the VNFD file and the VM infrastructure resources required by the VNF during the operation, determines, from all VDUs in the VNFD file, the second VDU having the greatest matching degree with the VM infrastructure resources required by the VNF during the operation, and expands the volume of the VNF according to the second VDU, in this embodiment, the VDU configured in advance for the VNF service is no longer used for expanding the volume, but the second VDU most matching the VM infrastructure resources required by the VNF during the operation is selected from all VDUs for expanding the volume, so that the configuration amount of the VM infrastructure resources in the second VDU is most similar to the amount of the VM infrastructure resources required by the VNF during the operation, and the volume expansion is performed according to the second VDU, the resource requirement of VNF service can be met, and the waste of infrastructure resources of the VM can not be caused.
Fig. 3 is a flowchart of a VNF capacity expansion method according to a second embodiment of the present invention. The execution subject of this embodiment is VNFM, as shown in fig. 3, the method includes the following steps:
step 201, determining VM infrastructure resources required by the VNF during operation according to the resource load of the VM executing the service in the VNF and the VM infrastructure resource information in the first VDU in the VNFD file.
And the first VDU is the VDU currently corresponding to the VNF.
In this embodiment, the specific implementation method of the step of determining, according to the VM infrastructure resource information in each VDU in the VNFD file, the second VDU with the largest matching degree with the VM infrastructure resources required by the VNF during running from all VDUs in the VNFD file includes steps 202 to 205.
Step 202, obtaining a first vector according to the resource load of the VM executing the service in the VNF and the VM infrastructure resource information in the first VDU.
In this embodiment, the first vector is a vector corresponding to VM infrastructure resources required by the VNF during runtime, the VNFM obtains the first vector according to resource load of a VM executing a service in the VNF and VM infrastructure resource information in the first VDU, and the first vector is represented as R ═ R (R ═ R)1,R2,...,Ri,...,Rn) Wherein R isiRepresenting the amount of use of infrastructure resources of the VM, e.g. R1Representing the CPU usage of the VM, R2Indicating the amount of memory used by the VM, etc.
Step 203, obtaining a second vector according to the VM infrastructure resource information in each VDU in the VNFD file.
In this embodiment, the second vector is a vector corresponding to the VM infrastructure resource in each VDU, and is represented as T ═ T (T ═ T)1,T2,...,Ti,...,Tn) Wherein, TiRepresenting the amount of use of infrastructure resources of a VM in a VDU, e.g. T1Represents the configuration quantity, T, of the CPU of the VM2Indicating the amount of memory allocated for the VM, etc.
It should be noted that the ordering of the elements in the second vector must be consistent with the first vector, e.g., R1Represents the CPU usage of the VM, T1The configuration amount of the CPU of the VM must be represented; r2Represents the amount of memory usage of the VM, T2The amount of memory allocation of the VM must be expressed.
And step 204, acquiring the matching degree between the first vector and each second vector.
In this embodiment, the matching degree between R and each vector in T can be calculated and recorded by a similarity algorithm, and the matching degree is obtained, and the matching degree is usually between 0 and 1. One common similarity measure is cosine similarity, and other similar similarity measures can be used, which is not limited in the present invention.
And step 205, taking the VDU corresponding to the second vector with the maximum matching degree as a second VDU.
In this embodiment, after the matching degrees between all the second vectors and the first vectors are obtained, the VDU corresponding to the second vector with the largest matching degree is taken as the second VDU.
In this embodiment, the specific implementation method of the step of "expanding the volume of the VNF according to the second VDU" includes steps 206 to 208.
Step 206, judging whether the matching degree between the VM infrastructure resources in the second VDU and the VM infrastructure resources required by the VNF in operation is greater than or equal to a preset threshold; if yes, go to step 207; if not, go to step 208.
In this embodiment, the matching degree is greater than or equal to 0 and less than or equal to 1, a preset threshold may be preset, and a size of the preset threshold is compared with the matching degree between the VM infrastructure resources in the second VDU and the VM infrastructure resources required by the VNF in the runtime, in order to ensure that the VM infrastructure resources in the second VDU are most matched with the VM infrastructure resources required by the VNF in the runtime, in general, a value of the preset threshold is not less than 0.8, specifically, the preset threshold may be equal to 0.85, 0.9, and the like, and a person skilled in the art may set the preset threshold according to actual needs.
And step 207, expanding the capacity of the VNF according to the second VDU.
In this embodiment, when the matching degree between the VM infrastructure resources in the second VDU and the VM infrastructure resources required by the VNF during operation is greater than or equal to the preset threshold, the VNF is expanded according to the second VDU.
Step 208, when the VNFD file is initialized, the VDU corresponding to the VNF in the VNFD file expands the VNF, and a new VDU is created in the VNFD file through the VNFD manager.
In this embodiment, when the matching degree between the VM infrastructure resources in the second VDU and the VM infrastructure resources required by the VNF during operation is smaller than the preset threshold, and when the VNFM initializes according to the VNFD file, the VDU corresponding to the VNF in the VNFD file expands the volume of the VNF, and a new VDU is created in the VNFD file through the VNFD manager. Because there is waiting time for establishing a new VDU, delay of VNF services may be caused, when a VNFD file is initialized, a corresponding VDU is configured for each VNF service, and when the VNF service is first expanded, or a VDU matching with VM infrastructure resources required by the VNF during operation is not found from all VDUs, the initialized VDU configured is used to expand the VNF. Therefore, delay of the VNF service caused by establishment of a new VDU is avoided, and the service quality of the VNF service is guaranteed. And if the matching degree between the VM infrastructure resources in the second VDU and the VM infrastructure resources required by the VNF during the operation is smaller than the preset threshold, in the initialization process of using the VNFD file, while the VDU set for the VNF expands the volume of the VNF, the VNFM may also create a new VDU in the VNFD file through the VNFD manager according to the VM infrastructure resources required by the VNF during the operation.
Optionally, in this embodiment, creating a new VDU in the VNFD file through the VNFD manager specifically includes: sending a VDU creation request to the NFVO; the VDU creation request carries VM infrastructure resource information required by the VNF during operation, and is used to request the NFVO to instruct the VNFD manager to create a new VDU in the VNFD file according to the VM infrastructure resource information required by the VNF during operation after the NFVO determines that the new VDU needs to be created.
In this embodiment, when a new VDU needs to be created, the VNFM sends a VDU creation request to the NFVO, the NFVO determines whether the new VDU needs to be created according to VM infrastructure resource information, which is carried in the VDU creation request and is needed by the VNF during operation, if it is determined that the new VDU needs to be created, the NFVO instructs the VNFD manager to create a new VDU in the VNFD file according to VM infrastructure resource information, which is needed by the VNF during operation, and when the VNF is expanded next time, the new VDU may be used to expand the VNF. Specifically, the VNFD manager is a logical entity that manages VNFD files, and a functional module needs to be established as the VNFD manager during actual implementation, and the functional module may be integrated in the NFVO or may be deployed in other modules. The role of the VNFD manager includes querying and modifying VNFD files, and creating, updating, deleting VNFD files, and the like, and is the final implementer of VNFD file management. Table 1 is a functional description of the VNFD manager.
TABLE 1
Operation of
|
Description of the invention
|
Query
|
This operation allows for the acquisition of part or all of the contents of a VNFD file
|
Modifying
|
This operation allows for modification of some or all of the contents of a VNFD file
|
Creating
|
This operation allows the creation of a new VNFD File
|
Updating
|
This operation allows for updates to the contents of a VNFD file
|
Deleting
|
This operation allows deletion of VNFD files |
It should be noted that, in this embodiment, The management of The VNFD file may be initiated by a VNFM or an Operation Support System (OSS), or may be initiated by an operation maintenance staff with a high level of authority, for example, The first way is: an operation maintenance worker with high authority can directly instruct a VNFD manager to perform VNFD file management through a VNF file management (package management) interface, and the operation maintenance worker needs to specify specific contents of the VNFD file management; the second way is: the VNFM or OSS requests the NFVO to perform VNFD file management, and after the NFVO permits VNFD file management operation, the NFVO initiates an instruction to the VNFD manager to indicate the VNFD manager to manage the VNFD file.
In the method for expanding the volume of the VNF provided in this embodiment, the VNFM vectorizes VM infrastructure resources required by the VNF in operation and VM infrastructure resources in all VDUs, and by calculating similarity between the first vector and the second vector, selects a second VDU that best matches the VM infrastructure resources required by the VNF in operation, and further compares a matching degree between the VM infrastructure resources in the second VDU and the VM infrastructure resources required by the VNF in operation with a preset threshold, and when the matching degree is greater than or equal to the preset threshold, expands the volume of the VNF according to the second VDU, which not only meets the requirement of the VNF service, but also does not waste the VM infrastructure resources; when the matching degree is smaller than the preset threshold, when the VNFD file is initialized, the VDU corresponding to the VNF in the VNFD file expands the VNF, and the VNFD manager creates a new VDU in the VNFD file, so that the current expansion of the VNF can be completed in time, and the service quality of the VNF service is ensured.
Fig. 4 is a flowchart of a VNF capacity expansion method according to a third embodiment of the present invention. On the basis of the embodiment shown in fig. 2 or fig. 3, an implementation principle of the method of "expanding the capacity of the VNF according to the second VDU" specifically includes the following steps:
and step 301, sending a capacity expansion request to the NFVO according to the second VDU.
The capacity expansion request comprises the number of VMs required for capacity expansion and infrastructure resource information of the VMs required for capacity expansion.
In this embodiment, the VNFM determines the number of VMs required for capacity expansion and the infrastructure resource information of the VMs required for capacity expansion according to the second VDU, and then generates a capacity expansion request according to the number of VMs required for capacity expansion and the infrastructure resource information of the VMs required for capacity expansion. After receiving the capacity expansion request, the NFVO queries a resource database to judge whether the capacity expansion request is feasible, if the resources in the resource database can meet the VNF service, the capacity expansion request is determined to be feasible, the NFVO establishes reserved resources through a Virtual Resource Management (VRM) interface, resources required by the capacity expansion VNF service are prevented from being seized, and a capacity expansion instruction is sent to a VNFM; if the resources in the resource database cannot meet the VNF service, it is determined that the capacity expansion request is not feasible, and the NFVO sends a resource shortage message to the VNFM or does not return any message.
Step 302, receiving a capacity expansion instruction sent by the NFVO.
The capacity expansion instruction carries resource information distributed by the NFVO for the capacity expansion of the VNF according to the capacity expansion request.
In this embodiment, the resource information allocated by the NFVO for the capacity expansion of the VNF is specifically reserved resource information created by the NFVO through the VRM interface.
And step 303, creating and starting a VM required for capacity expansion according to the capacity expansion instruction.
Optionally, in this embodiment, a matching module may be established in the VNFM, and a communication interface may be established between the matching module and the NFVO, where the matching module is configured to determine, from all VDUs in the VNFD file, a second VDU that has a maximum matching degree with VM infrastructure resources required by the VNF when the VNF runs according to the VM infrastructure resource information in each VDU in the VNFD file and the VM infrastructure resources required by the VNF when the VNF runs, and the communication interface is configured to implement communication between the matching module and the NFVO, for example, after the matching module selects the second VDU, the matching module sends a capacity expansion request to the VNFO through the communication interface, or, when a new VDU needs to be created, the matching module sends a VDU creation request to the VNFO through the communication interface.
In this embodiment, the VNFM receives an expansion instruction sent by the NFVO, and the VNFM creates and starts a VM required for expansion according to reserved resource information in the expansion instruction. The specific process is as follows: the VNFM requests the VIM to create a VM required for capacity expansion, the VIM creates and starts the VM required for capacity expansion and correspondingly allocates network resources, then successful creation information is sent to the VNFM, the VNFM sets parameters such as basic setting resource information and an operating system of the VM of the VNF, the number of the VMs added for capacity expansion of the VNF service and basic facility resource information of the added VMs are sent to Element Management Equipment (EM) so that the EM sets relevant parameters of the VNF service, then the VNFM reports messages of successful capacity expansion of the VNF to the NFVO, and the NFVO associates the VNF service to a proper VIM and a resource pool.
In the method for expanding the volume of the VNF provided in this embodiment, after the VNFM determines the second VDU, the VNFM sends an expansion request to the NFVO according to the second VDU, receives an expansion instruction sent by the NFVO and carrying resource information allocated by the NFVO to expand the VNF according to the expansion request, and creates and starts a VM required for expansion according to the expansion instruction, thereby completing the entire process of expanding the volume of the VNF, meeting the demand of the VNF service, ensuring the quality of service, and reducing the waste of VM infrastructure resources.
Fig. 5 is a schematic structural diagram of a VNF capacity expansion device according to a fourth embodiment of the present invention. As shown in fig. 5, the apparatus includes a determination module 11, a matching module 12, and a capacity expansion module 13. The determining module 11 is configured to determine, according to the resource load of the VM executing the service in the VNF and the VM infrastructure resource information in the first VDU in the VNFD file, a VM infrastructure resource required by the VNF during running; and the first VDU is the VDU currently corresponding to the VNF. The matching module 12 is configured to determine, according to the VM infrastructure resource information in each VDU in the VNFD file and the VM infrastructure resources required by the VNF during runtime, a second VDU with a largest matching degree with the VM infrastructure resources required by the VNF during runtime from all VDUs in the VNFD file. The capacity expansion module 13 is configured to expand the capacity of the VNF according to the second VDU.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 2, and the implementation principle and the technical effect are similar, which are not described herein again.
Further, on the basis of the embodiment shown in fig. 5, in the VNF capacity expansion apparatus provided in the fifth embodiment of the present invention, the capacity expansion module 13 is specifically configured to determine whether a matching degree between the VM infrastructure resources in the second VDU and the VM infrastructure resources required by the VNF during operation is greater than or equal to a preset threshold; if yes, the capacity expansion module 13 expands the capacity of the VNF according to the second VDU; if not, when the capacity expansion module 13 initializes according to the VNFD file, the VDU corresponding to the VNF in the VNFD file expands the capacity of the VNF, and a new VDU is created in the VNFD file through the VNFD manager.
In this embodiment, the matching module 12 is specifically configured to obtain a first vector according to the resource load of the VM executing the service in the VNF and the VM infrastructure resource information in the first VDU; acquiring a second vector according to the VM infrastructure resource information in each VDU in the VNFD file; obtaining the matching degree between the first vector and each second vector; and taking the VDU corresponding to the second vector with the maximum matching degree as the second VDU.
In this embodiment, the capacity expansion module 13 is further configured to send a VDU creation request to the network function virtualization orchestrator NFVO; the VDU creation request carries VM infrastructure resource information required by the VNF during operation, and is used to request the NFVO to instruct the VNFD manager to create a new VDU in the VNFD file according to the VM infrastructure resource information required by the VNF during operation after the NFVO determines that the new VDU needs to be created.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 3, and the implementation principle and the technical effect are similar, which are not described herein again.
Further, on the basis of the fifth embodiment, in the VNF capacity expansion device provided in the sixth embodiment of the present invention, the capacity expansion module 13 is further specifically configured to send a capacity expansion request to the NFVO according to the second VDU; the capacity expansion request comprises the quantity of VMs required by capacity expansion and infrastructure resource information of the VMs required by the capacity expansion; the capacity expansion module 13 is further specifically configured to receive a capacity expansion instruction sent by the NFVO, and create and start a VM required for capacity expansion according to the capacity expansion instruction; the capacity expansion instruction carries resource information distributed by the NFVO for the capacity expansion of the VNF according to the capacity expansion request.
Optionally, in this embodiment, a communication interface may be established between the matching module and the NFVO, where the communication interface is used to implement communication between the matching module and the NFVO, for example, after the matching module selects the second VDU, the matching module sends a capacity expansion request to the VNFO through the communication interface, or when a new VDU needs to be created, the matching module sends a VDU creation request to the VNFO through the communication interface.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 4, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 6 is a schematic structural diagram of a device for capacity expansion of a VNF according to a seventh embodiment of the present invention. As shown in fig. 6, the apparatus includes a processor 21, a receiver 22, and a transmitter 23. The processor 21 is configured to determine, according to the resource load of the VM executing the service in the VNF and the VM infrastructure resource information in the first VDU in the VNFD file, a VM infrastructure resource required by the VNF during running; and the first VDU is the VDU currently corresponding to the VNF. The processor 21 is configured to determine, according to the VM infrastructure resource information in each VDU in the VNFD file and the VM infrastructure resources required by the VNF during runtime, a second VDU with a largest matching degree with the VM infrastructure resources required by the VNF during runtime from all VDUs in the VNFD file. The processor 21 is further configured to expand the VNF according to the second VDU. The receiver 22 is configured to receive resource loads of VMs executing a service in the VNF sent by the monitoring device, or information sent by other devices to a device that expands the capacity of the VNF. The transmitter 23 is used to send information to other devices in communication with the VNF-expanded device.
Optionally, the processor 21 is configured to determine whether a matching degree between a VM infrastructure resource in the second VDU and a VM infrastructure resource required by the VNF during running is greater than or equal to a preset threshold; if so, the processor 21 expands the volume of the VNF according to the second VDU; if not, when the processor 21 initializes according to the VNFD file, the VDU corresponding to the VNF in the VNFD file expands the VNF, and creates a new VDU in the VNFD file through the VNFD manager.
Optionally, the processor 21 is further configured to obtain a first vector according to resource load of a VM executing a service in the VNF and VM infrastructure resource information in the first VDU; acquiring a second vector according to the VM infrastructure resource information in each VDU in the VNFD file; obtaining the matching degree between the first vector and each second vector; and taking the VDU corresponding to the second vector with the maximum matching degree as the second VDU.
Optionally, the transmitter 23 is further configured to send a VDU creation request to the NFVO; the VDU creation request carries VM infrastructure resource information required by the VNF during operation, and is used to request the NFVO to instruct the VNFD manager to create a new VDU in the VNFD file according to the VM infrastructure resource information required by the VNF during operation after the NFVO determines that the new VDU needs to be created.
Optionally, the transmitter 23 is further configured to send a capacity expansion request to the NFVO according to the second VDU; the capacity expansion request comprises the quantity of VMs required by capacity expansion and infrastructure resource information of the VMs required by the capacity expansion; the receiver 22 is configured to receive a capacity expansion instruction sent by the NFVO; the capacity expansion instruction carries resource information distributed by the NFVO for the capacity expansion of the VNF according to the capacity expansion request; the processor 21 is also configured to create and start a VM required for capacity expansion according to the capacity expansion instruction.
The VNF capacity expansion device provided in this embodiment may be configured to execute the technical solution of any one of the above VNF capacity expansion method embodiments, and the implementation principle and the technical effect are similar, and are not described herein again.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media capable of storing program codes, such as Read-Only Memory (ROM), Random Access Memory (RAM), magnetic disk, or optical disk.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.