VNF resource processing method, storage medium and program product
By automatically executing the operation chain by matching the resource operation rule knowledge chain set, the difficulty of recovery when the VNF virtual resource operation fails is solved, and the recovery process is simplified and the success rate is improved in complex scenarios.
Patent Information
- Application Number
- CN202510804387.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2025-09-19
AI Technical Summary
In complex business scenarios, when a VNF's virtual resource operation fails, existing technologies require processing each resource object one by one, making recovery difficult.
A VNF resource processing method is provided. By matching the operation data of the target VNF with the resource operation rule knowledge chain set, the target operation chain is determined and each step in the operation chain is automatically executed to reduce the recovery difficulty.
In complex business scenarios, the automated recovery process eliminates the need to pay attention to the dependencies between resource objects and the order of operations, simplifying the recovery process of virtual resource operations and improving the success rate and ease of use.
Smart Images

Figure CN120670088A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to, but are not limited to, the field of wireless communication technology, and in particular to a VNF resource processing method, storage medium, and program product. Background Art
[0002] Virtualized Network Functions (VNFs) are a key component of the Network Function Virtualization (NFV) architecture. VNFs abstract traditional network functions from dedicated hardware devices and run them in software on general-purpose computing, storage, and network resources. This virtualization technology makes network services more flexible, scalable, and rapidly deployable and adaptable. However, in practical applications, VNF lifecycle management often relies on the successful execution of virtual resource operations (such as VNF instantiation, VNF updates, and VNF scaling). However, in related technologies, the process for handling virtual resource operations often involves performing individual operations on each resource object involved in a failed virtual resource operation through the MANO management interface. However, these individual operations require users to be familiar with the functions of each resource object and the relationships between them in order to successfully recover virtual resource operations within the VNF. Recovery of VNF virtual resource operations becomes even more challenging when the VNF involves complex business and resource scenarios. Therefore, a VNF resource handling method is urgently needed to reduce the difficulty of recovering from virtual resource operation failures. Summary of the Invention
[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0004] The embodiments of the present application provide a VNF resource processing method, storage medium, and program product, which can reduce the difficulty of recovery when virtual resource operations fail.
[0005] In the first aspect, according to the resource processing method of the virtualized network function VNF provided in an embodiment of the present application, the method includes: in response to receiving a recovery operation request after the operation of the target VNF fails, matching the operation data of the target VNF with the resource operation rule knowledge chain set, determining the target operation chain, and the target operation chain includes at least one operation for a resource object; executing each operation in the target operation chain.
[0006] In a second aspect, a computer-readable storage medium provided according to an embodiment of the present application stores computer-executable instructions, which, when executed by a processor, enable the processor to implement a resource processing method for a virtualized network function as described in any one of the first aspects.
[0007] In a third aspect, a computer program product provided according to an embodiment of the present application includes a computer program or computer instructions, wherein the computer program or the computer instructions are stored in a computer-readable storage medium, and the processor of the network device reads the computer program or the computer instructions from the computer-readable storage medium, and the processor executes the computer program or the computer instructions, so that the network device performs the resource processing method for virtualized network functions as described in any one of the first aspects.
[0008] According to the above-mentioned embodiment of the present application, there are at least the following beneficial effects: by matching the target VNF's operation data with the resource operation rule knowledge chain set upon receiving a recovery operation request after the target VNF operation fails, determining the target operation chain and executing each operation in the target operation chain, it is possible to achieve automatic recovery of virtual resource operations based on the target VNF as the operation object. Compared with related technologies, in complex business scenarios, the recovery process based on the resource operation rule knowledge chain set in the embodiment of the present application does not need to pay attention to the dependencies between the resource objects involved in the virtual resource operation recovery and the order in which the resource objects are issued, but only needs to pay attention to the virtual resource operation itself, thereby reducing the difficulty of recovery when the virtual resource operation fails. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 A schematic diagram of the architecture of an embodiment of the VNF resource processing method provided in the embodiment of the present application applied to an NFV system; Figure 2 A flowchart of an embodiment of the VNF resource processing method provided in the present application applied to an NFV system; Figure 3 A schematic diagram of a structure of an embodiment of the VNF resource processing method provided in an embodiment of the present application applied to a MANO component; Figure 4 A flowchart of an embodiment of a VNF resource processing method provided in an embodiment of the present application; Figure 5 A flowchart of an embodiment of generating a resource operation rule knowledge chain set in the VNF resource processing method provided in an embodiment of the present application; Figure 6 A flowchart of an embodiment of a VNF resource processing method provided in an embodiment of the present application; Figure 7 A structural diagram of the hardware structure corresponding to the resource processing method of the VNF provided in an embodiment of the present application. DETAILED DESCRIPTION
[0010] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0011] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and so on, in the specification, claims, and drawings, are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.
[0012] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.
[0013] The following is an explanation of the terms involved in the embodiments of this application: Network Function Virtualization, or NFV for short, is a network architecture proposed by the European Telecommunications Standards Institute (ETSI) from the perspective of network operators. It virtualizes the functions of network elements (NEs) using common IT technologies and platforms. Based on VNFs, it orchestrates corresponding virtualized network function blocks to meet different business application requirements.
[0014] Network Function Virtualization Orchestrator, also known as Network Function Virtualization Orchestrator, abbreviated as NFVO.
[0015] Virtual Network Function Manager, also known as Virtual Network Function Manager, abbreviated as VNFM.
[0016] Virtual Infrastructure Manager, also known as Virtual Infrastructure Manager, abbreviated as VIM.
[0017] Management and Orchestration (MANO) is a key component of the NFV architecture, used to manage and orchestrate network services. MANO, through the collaborative work of NFVO, VNFM, and VIM, enables flexible and efficient management and orchestration of network services, improving network flexibility and scalability while significantly reducing operating costs.
[0018] Virtualized Network Function, also known as Virtualized Network Function, abbreviated as VNF.
[0019] The Virtualized Network Function Descriptor (VNFDescriptor) is a description template for deploying VNFs. It defines the deployment and operation requirements of the VNF, as well as the connection, interface, and virtual resource requirements related to the deployment of the VNF.
[0020] Virtualized network function module component, also known as Virtualised Network Function Component; abbreviated as VNFC.
[0021] Virtualisation Deployment Unit, also known as Virtualisation Deployment Unit (VDU), describes the deployment and operation behavior of VNFC.
[0022] Operation and Maintenance Center, also known as Operation and Maintenance Center, abbreviated as OMC.
[0023] Operations Support System, also known as Operations Support System, abbreviated as OSS.
[0024] Physical Resource Manager, also known as Physical Resource Manager, abbreviated as PIM.
[0025] Virtualized Network Functions (VNFs) are a key component of the Network Function Virtualization (NFV) architecture. VNFs abstract traditional network functions from dedicated hardware devices and run them in software on general-purpose computing, storage, and network resources. This virtualization technology makes network services more flexible, scalable, and rapidly deployable and adaptable. However, in practical applications, VNF lifecycle management often relies on the successful execution of virtual resource operations (such as VNF instantiation, VNF updates, and VNF scaling). However, existing techniques often involve performing individual operations on each resource object involved in a failed virtual resource operation through the MANO management interface. However, these individual operations require users to be familiar with the functions of each resource object and the relationships between them in order to successfully recover virtual resource operations within the VNF. Recovery of VNF virtual resource operations becomes even more challenging when the VNF involves complex business and resource scenarios. Therefore, a VNF resource management method is urgently needed to reduce the difficulty of recovering from failed virtual resource operations. Based on this, the embodiments of the present application provide a VNF resource processing method, storage medium and program product, which can help users perform resource analysis and processing when executing recovery request operations (such as retrying or rolling back) after the virtual resource operation of the VNF fails, automatically issue virtual resource operations, and improve the success rate and ease of use of resource operations.
[0026] Reference Figure 1 and Figure 2 As shown, the NFV system provided according to an embodiment of the present application includes: MANO components; MANO components include VNFM module, VIM module, NFVO module and resource resolver; Virtualization platform module; VNF module, the VNF module communicates with the VNFM module; Among them, the resource resolver is used to respond to the recovery operation request received from the NFVO module after the target VNF operation fails, match the operation data of the target VNF with the resource operation rule knowledge chain set, and determine the target operation chain; the NFVO module executes each operation of the target operation chain output by the resource resolver; after the NFVO module successfully executes each operation of the target operation chain, the VNF module notifies the VNF module of the success of the resource operation through the VNFM module, so that the VNF module can determine that the required computing, storage, network and other resources are ready as required, and can start or adjust functions normally.
[0027] In some embodiments, a resource operation rule knowledge chain set is recorded in the resource parser, and the resource operation rule knowledge chain set includes at least one candidate operation rule knowledge chain, each candidate operation rule knowledge chain is used to map the operations and operation sequence that need to be performed during the recovery processing of a type of virtual resource operation; thereby, the dependency relationship of the resource types and actions in different virtualization platforms configured by the VNFM module can be integrated with the differentiated business scenario configuration content of the VNF module to form different candidate operation chains, and the candidate operation rule knowledge chains are combined to obtain a resource operation rule knowledge chain set. The candidate operation chain can be generated dynamically, such as synchronously when the target operation request for the VNF is issued. The target operation request is used to issue virtual resource operations.
[0028] A recovery operation request is used to request the recovery of a virtual resource operation issued with the VNF as the operation object. The recovery operation request includes at least operation information about the virtual resource operation (e.g., which virtual resource object is being recovered and what type of operation is being recovered). In some embodiments, the recovery operation request also includes a recovery type (e.g., retry or rollback). In some embodiments, the recovery operation request is a retry operation request, requesting the reissuance of the currently failed virtual resource operation. In other embodiments, the recovery operation request is a rollback operation request, requesting the configuration to be rolled back to the configuration before the virtual resource operation was issued or to a specified time.
[0029] In some embodiments, as Figure 3 As shown, the resource resolver is integrated into the VNFM module to construct candidate operation chains within the VNFM module and dynamically generate the next resource operation content (i.e., the operations and operation sequence required for the recovery process) based on the processing results of the target operation request for the target VNF. In other embodiments, the resource resolver can also be independent of the VNFM module and interact with the VNFM module to implement the construction of candidate operation chains.
[0030] For example, Figure 1 Take the NFV system architecture shown in the figure as an example. Figure 1 As shown in the figure, the network device is divided into the hardware layer, the virtual layer and the network element layer. Among them, the MANO component manages the hardware layer of at least one network device and interacts with the virtual layer and the network element layer of the network device. The VNF module is located in the network element layer of the network device, and the virtualization platform module is located in the virtual layer. The VIM module communicates with the virtualization platform module to achieve virtualization management of hardware resources. Through the collaborative work of the NFVO module, the VNFM module and the VIM module, flexible and efficient management and arrangement of network services on the VNF module are achieved. At this time, based on Figure 1 In the embodiment of the present application, the recovery process for VNF issuing virtual resource operations and virtual resource operation failures is as follows: Figure 2The specific steps are as follows: S1. Initiate a target operation request for the target VNF to the NFVO module. The target operation request is used to request virtual resource operations (such as VNF instantiation, VNF update, VNF scaling, and other operations involved in the target VNF lifecycle management) for the target VNF. The target operation request can be initiated by the user through the OSS to the NFVO module or triggered by an automated configuration file.
[0031] S2. The NFVO module notifies the VNFM module to trigger the virtual resource operation of the target VNF, where each virtual resource operation includes a resource operation of at least one resource object. For example, each resource operation can be one or more resource operations such as port resources, cloud disk resources, security group resources, and service group resource creation and deletion.
[0032] S3. The VNFM module notifies the VNF module to perform resource operations on the target VNF and preprocess the VNF module.
[0033] S4. The VNFM module notifies the NFVO module of the VNFD content to trigger resource operations corresponding to the virtual resource operation. For example, if the virtual resource operation is to create a VIM, the resource operations corresponding to the VIM creation include port creation and cloud disk resource creation.
[0034] S5: The VNFM module initiates a resource operation to the VIM module. If the resource operation fails, the process jumps to S6.
[0035] S6. Record resource operation result data and suspend execution of the task corresponding to the target operation request.
[0036] S7. Initiate a recovery operation request for the target VNF for the target operation to the NFVO module.
[0037] S8. The NFVO module notifies the VNFM module to trigger a recovery process for the target VNF for the failed virtual resource operation. The recovery process can be a rollback recovery process or a retry recovery process. The specific recovery process type can be determined based on the recovery operation request.
[0038] S9. After the VNFM module parses the target operation chain corresponding to the recovery operation request through the resource parser, it notifies the NFVO module to obtain the target operation chain.
[0039] S10: The NFVO module initiates resource operations to the VNF module according to the operations in the target operation chain. When all resource operations are successful, it jumps to S11.
[0040] S11. The NFVO module sends a successful resource operation to the VNFM module.
[0041] S12. The VNFM module notifies the VNF module that the resource operation is successful, and the target VNF waits for service configuration.
[0042] S13. The VNFM module notifies the NFVO module that the recovery operation type is successful.
[0043] It is understandable that, referring to Figure 4 As shown, according to the resource processing method of the virtualized network function VNF according to the embodiment of the present application, the method includes: Step S100: In response to receiving a recovery operation request after a target VNF operation fails, matching the target VNF operation data with a resource operation rule knowledge chain set to determine a target operation chain, where the target operation chain includes at least one operation for a resource object; Step S200: Execute each operation in the target operation chain.
[0044] Therefore, by receiving a recovery operation request after the target VNF operation fails, matching the target VNF's operation data with the resource operation rule knowledge chain set, determining the target operation chain and executing each operation in the target operation chain, it is possible to achieve automatic recovery of virtual resource operations based on the target VNF as the operation object. At this time, in complex business scenarios, the recovery process based on the resource operation rule knowledge chain set in the embodiment of the present application does not need to pay attention to the dependencies between the various resource objects involved in the virtual resource operation recovery and the order in which the resource objects are issued. It only needs to pay attention to the virtual resource operation itself, thereby reducing the difficulty of recovery when the virtual resource operation fails.
[0045] The recovery operation request in step S100 is used to start the recovery process of the virtual resource operation issued with VNF as the operation object. The recovery process can be a re-issuance or rollback of the virtual resource operation that has been issued.
[0046] The operation data includes at least information about the virtual resource operation issued by the target VNF, such as information about creating a VIM. In other embodiments, different recovery processes are performed for different failure causes. Therefore, the operation data also includes operation result data, such as information indicating failure or failure to create the xxx resource object. Those skilled in the art may select and set this information based on actual circumstances.
[0047] The resource operation rule knowledge chain set is used to record the operational process for recovering virtual resource operations targeting VNFs. The present embodiments do not restrict the composition of each candidate operation rule knowledge chain in the resource operation rule knowledge chain set. In some embodiments, each candidate operation rule knowledge chain includes candidate operation information and a candidate operation chain. In other embodiments, each candidate operation rule knowledge chain includes candidate operation data and a candidate operation chain. The candidate operation data includes candidate operation information and candidate operation result data. In other embodiments, each candidate operation rule knowledge chain includes candidate operation information, candidate operation chain, candidate operation result data, and a recovery type. Persons skilled in the art may select and configure this based on actual circumstances. The candidate operation chain records the operational process for each virtual resource operation involved in recovery. For example, if the candidate operation chain is [step 1: delete vm; step 2: delete sys_volume; step 3: create sys_volume; step 4: create vm], delete vm, delete sys_volume, create sys_volume, and create vm are all virtual resource operations involved in recovery.
[0048] The target operation chain is a candidate operation chain that matches the recovery operation request. It records the operations on each resource object involved in the recovery. Resource objects can be virtual or real (such as hardware resources like ports). Step S200 executes each operation in the order recorded in the target operation chain.
[0049] For example, a user initiates a virtual resource operation A for a target VNF in its lifecycle. When virtual resource operation A fails, the operation data of virtual resource operation A is recorded, such as vm+create+error+failed. At the same time, the operation results of all resource objects under virtual resource operation A can be seen on the interface. At this time, the user can choose to retry or rollback the virtual resource operation A. At this time, by matching the target knowledge chain with the same operation data as virtual resource operation A from the resource operation rule knowledge chain set, the target knowledge chain [step1: delete vm; step2: delete sys_volume; step3: create sys_volume; step4: create vm] is obtained. The recovery process can be started based on the target knowledge chain, and delete vm, delete sys_volume, create sys_volume, and create vm are executed in sequence. Therefore, the usability of the virtual resource processing method based on the embodiment of the present application can be significantly improved.
[0050] It is understood that the method further comprises: Obtain dependent resource data corresponding to the target operation request for the target VNF; Determine a candidate operation chain corresponding to the target operation request based on the dependent resource data; The candidate operation chains are stored in the initial resource operation rule knowledge chain set to obtain the resource operation rule knowledge chain set.
[0051] Different VIM platforms (such as OpenStack, VMware vSphere, and Kubernetes) have different interface specifications. VNFM modules must interact with VIMs through standardized interfaces. Therefore, dependencies between VIMs are configured within the VNFM modules. Dependency resource data represents the dependencies between different resource objects. This dependency resource data can be obtained from the VNFM module. Dependencies indicate the execution order of different types of operations on different resource objects. For example, when creating a virtual object, a VM resource requires the creation of dependent resources such as specification resources, port resources, and cloud disk resources. Therefore, creating the VM and the specification resources, port resources, and cloud disk resources form a dependency relationship. If these resources are also involved, they should be created before creating the VM.
[0052] The target operation request defines the operation data issued to the VIM for the target VNF. A candidate operation chain represents a recovery process that ensures the virtual resource operation corresponding to the target operation request can be recovered. In some embodiments, the recovery process is the reverse operation of the virtual resource operation corresponding to the target operation request, thereby enabling rollback of the virtual resource operation corresponding to the target operation request. Therefore, the target resource object and target operation type can be extracted from the operation data of the target operation request, and the reverse operation of the target operation type can be used as the recovery operation type. The execution order of the target resource objects under each recovery operation type is then sorted using the dependent resource data to determine the candidate operation chain. In other embodiments, the recovery process is a combination of the reverse operation of the virtual resource operation corresponding to the target operation request and the virtual resource operation, thereby enabling re-issuance of the virtual resource operation corresponding to the target operation request. In other embodiments, the recovery operation required to be restored for the target operation is pre-set. In this case, the pre-set recovery operations (including the target resource object and recovery operation type) can be sorted using the dependent resource data to determine the candidate operation chain. At this time, when configuring the recovery operation, you do not need to pay attention to the order of the recovery operations. You only need to pay attention to which resource objects are to be used for which types of recovery operations, which makes the operation simpler.
[0053] It can be understood that obtaining the dependent resource data corresponding to the target operation request includes: Extracting the recovery operation type to be performed after the target operation corresponding to the target operation request fails, and the target resource object corresponding to the recovery operation type, from the preset business resource demand data; Determine the dependent resource data based on the target resource object and the recovery operation type.
[0054] The target operation is the virtual resource operation corresponding to the target operation request.
[0055] Business resource request data represents the recovery operations required for different recovery processes based on different operation result data. Each recovery operation defines different resource objects and the type of operation performed on them. Operation types include create, delete, and modify. Operation result data includes failure, success, or custom error codes (such as available / in-use).
[0056] The dependent resource data is used to record the corresponding target resource object and the resource objects that the operation of the recovery operation type depends on and the operation type corresponding to the resource objects.
[0057] Therefore, by searching and matching the target resource object and the recovery operation type in the recorded dependency relationships, the dependent resource data can be determined.
[0058] It can be understood that obtaining the dependent resource data corresponding to the target operation request includes: Extracting a target resource object and a target operation type corresponding to the target resource object from the operation request data corresponding to the target operation request; Determine the recovery operation type of the target resource object according to the target operation type; Determine the dependent resource data based on the target resource object and the recovery operation type.
[0059] The operation type of the reverse operation corresponding to the target operation can be used as the recovery operation type. By directly extracting the target resource object and target operation from the operation data, automatic dependency matching can be performed for operations with simple dependencies, eliminating the need to configure business resource requirement data. This simplifies the process of issuing target operation requests and initiating recovery operation requests.
[0060] In some embodiments, the dependent resource data also includes determination based on the target resource object, the recovery operation type, and the target operation type, thereby achieving automatic rollback and re-issuance of the target operation.
[0061] It can be understood that the dependent resource data includes at least one dependent resource object and a dependency relationship corresponding to the dependent resource object; determining a candidate operation chain corresponding to the target operation request based on the dependent resource data includes: From each dependency relationship, determine a target dependency relationship in which the dependent resource objects matching each target resource object have a one-to-one correspondence when they have the same recovery operation type; Determine the execution order of the recovery operation composed of the corresponding target resource object and the recovery operation type and the recovery operations corresponding to the remaining target resource objects according to the target dependency relationship; According to the execution sequence, target resource object and recovery operation type, a candidate operation chain is obtained.
[0062] For example, if the dependency relationship corresponding to dependent resource object A is relationship 1, the dependency relationship corresponding to dependent resource object B is relationship 2, and the dependency relationship corresponding to dependent resource object C is relationship 3, then when the target resource object is A, relationship 1 can be used as the target dependency relationship for A. Based on relationship 1, the execution order of recovery operation 1, obtained by combining the recovery operations corresponding to target resource object A, and recovery operations n for the remaining target resource objects can be determined. By performing the above operations on each target resource, the execution order between any two recovery operations can be determined.
[0063] It can be understood that the candidate operation chains are stored in the initial resource operation rule knowledge chain set, and the resource operation rule knowledge chain set is obtained, including: In response to detecting business resource demand data in the target operation request, determining a candidate recovery request type from the business resource demand data; In response to not detecting the business resource demand data in the target operation request, determining the preset operation type as a candidate recovery request type; The candidate operation chain is bound to the corresponding candidate recovery request type and stored as a candidate operation rule knowledge chain in the initial resource operation rule knowledge chain set to obtain the resource operation rule knowledge chain set.
[0064] By supporting both the business resource demand data recovery operation configuration method and the automatic recovery method, the operational convenience of issuing target operation requests and initiating recovery operation requests can be further improved.
[0065] For example, refer to Figure 5 As shown, taking the generation of each candidate rule operation knowledge chain in the resource operation rule knowledge chain set when issuing a target operation request to the target VNF as an example, the generation process of the resource operation rule knowledge chain set in the resource processing method of the VNF in the embodiment of the present application is described: S1. During the life cycle of the target VNF, a target operation request is initiated for the target VNF, wherein the target operation request may include at least one virtual resource operation such as VNF instantiation, VNF update, VNF expansion or contraction, etc.
[0066] S2. Determine whether each virtual resource operation in the target operation request is configured with business resource demand data. Business resource demand data can be pre-set in the VNF package or configured online through the VNF management interface of MANO. If business resource demand data is configured, jump to S3; otherwise, jump to S4.
[0067] S3. Read the recovery operation from the business resource demand data. The recovery operation includes the target resource object and the recovery operation type corresponding to the target resource object.
[0068] S4. According to the target resource object and the recovery operation type corresponding to the target resource object, obtain the preset dependency relationship, obtain the dependent resource data, determine the relationship between each recovery operation according to the dependent resource data, and obtain the candidate operation rule knowledge chain corresponding to the target operation one by one. When the recovery type in the recovery operation in the business resource request data is limited to retry, jump to S5, otherwise jump to S6. Among them, for virtual resource operations that are not configured with business resource request data, when the default recovery type is fallback, each resource object under the virtual resource operation is used as the target resource object, and the operation type of the reverse operation corresponding to the target resource object is used as the recovery operation type, thereby determining each recovery operation during the default fallback recovery under the unconfigured business resource request data. When the default recovery type is retry, the operation type performed by the target resource object is also used as the recovery operation type.
[0069] S5. Store the candidate operation rule knowledge chain in the retry rule knowledge sub-chain set.
[0070] S6. Store the candidate operation rule knowledge chain in the fallback rule knowledge sub-chain set.
[0071] Assume that the target operation request in S1 is for a VNF update. The VM image needs to be upgraded, and the VM replaces the system cloud disk created with the new image, while the data cloud disk remains. In this scenario, virtual resource operations include VM operations. Accordingly, the business resource request data configured in S2 is described in JSON, YAML, and other files as follows: vm:# Resource object type create:# Resource Action result: failed# Resource operation result status:# Resource status list - ERROR# Resource status retry:# Business requirements when retrying pre_operate:# Pre-resource operation delete:# delete - vm# delete the virtual machine - sys_volume# Delete the system cloud disk of the virtual machine modify: []# modify create: []# Create operate:# Resource operation delete: []# delete modify: []# modify create:# Create - vm# delete the virtual machine - sys_volume# Delete the system cloud disk of the virtual machine post_operate:# Post-resource operation delete: []# delete modify: []# modify create: []# Create rollback:# Business requirements for rollback pre_operate:# Pre-resource operation delete:# delete - vm# delete the virtual machine - sys_volume# Delete the system cloud disk of the virtual machine modify: []# modify create: []# Create operate:# Resource operation delete: []# delete modify: []# modify create:# Create - vm# delete the virtual machine - sys_volume# Delete the system cloud disk of the virtual machine post_operate:# Post-resource operation delete: []# delete modify: []# modify create: []# Create The business resource demand data described above defines the recovery actions for a rollback (also known as a rollback) after a VM creation failure, including deleting the VM, deleting the VM's system cloud disk, adding a VM, and adding a VM's system cloud disk. The recovery actions for a retry (also known as a retry) after a VM creation failure include deleting the VM, deleting the VM's system cloud disk, adding a VM, and adding a VM's system cloud disk. Therefore, by reading this business resource demand data, we can determine the recovery actions required to perform different types of recovery processes for different virtual resource operations with different failure outcomes.
[0072] Taking dependency relationships described in JSON, YAML, etc. as an example, assume that the obtained dependency resource data is as follows: vm:# Resource object type, virtual machine create:# Create other dependent resource object types - flavor# specification resource - port# port resource - volume# cloud disk resources - security_group# security group resource - server_group# service group resources delete: []# Delete other dependent resource object types port:# Resource object type, port create:# Create other dependent resource object types - network# Network resources - subnetwork# Subnetwork resources - qos_policy# Network QoS policy resources - security_group# security group resource delete:# Delete other dependent resource object types - vm# virtual machine resources - trunk# trunk resources volume:# Resource object type, cloud disk create:# Create other dependent resource object types - volume_type# Cloud disk type resource delete:# Delete other dependent resource object types - vm# virtual machine resources As can be seen above, VM creation requires cloud disk resources. Deleting VMs and cloud disk resources is not restricted. Restoring also involves creating cloud disk resources and VMs. Therefore, you only need to ensure that cloud disk resources are created before VM creation. The order of restore operations is as follows: [step 1: deletevm; step 2: delete sys_volume; step 3: create sys_volume; step 4: create vm].
[0073] Therefore, through the above steps, when a virtual resource operation fails during the VNF lifecycle management process and a retry or rollback is initiated, the collected processing results of all resource objects involved are used as the input of the resource parser. Each resource object matches the rule knowledge chain, summarizes and outputs the resource processing content that meets the conditions, and re-initiates the resource operation to finally complete the resource processing.
[0074] It can be understood that the method of extracting, from the preset business resource demand data, the recovery operation type to be performed after the target operation corresponding to the target operation request fails, and the target resource object corresponding to the recovery operation type, includes: extracting the target resource object of at least one recovery operation type from the business resource demand data according to the preset operation type traversal rule; and traversing the target resource objects of each recovery operation type respectively; Determining dependent resource data according to the target resource object and the recovery operation type includes: determining the dependent resource data according to the traversed recovery operation type and the target resource object.
[0075] The recovery operation type includes at least one of deletion, modification, and creation. The recovery operation type is the operation type of the operation performed during recovery.
[0076] For example, taking the three types of recovery operations, namely delete, modify, and create, as an example, the resource objects under the delete, modify, and create operation types are traversed respectively. For each traversed resource object, whether there is a dependency relationship is determined. If a dependency relationship exists, it means that the traversed resource object A needs to rely on the untraversed resource object B. Based on the dependency relationship, the recovery operation corresponding to resource object B is adjusted before the recovery operation corresponding to resource object A. The resource objects under each recovery operation type are traversed again until all resource objects are traversed. If no dependency relationship exists, the next dependent resource is traversed until all resource objects are traversed.
[0077] It can be understood that each candidate operation rule knowledge chain in the resource operation rule knowledge chain set includes a candidate recovery request type, candidate operation data, and a candidate operation chain. The operation data for the target VNF is matched with the preset resource operation rule knowledge chain set to determine the target operation chain, including: determining a recovery request type for the recovery operation request; Matching the recovery request type with each candidate recovery request type and matching the operation data with each candidate operation data; In response to the candidate operation data and the candidate recovery request type in the same candidate operation rule knowledge chain matching the operation data and the recovery request type respectively, the candidate operation chain in the matching candidate operation rule knowledge chain is used as the target operation chain.
[0078] The recovery request type can be determined based on the command type defined in the recovery operation request itself, or it can be determined by the parameters carried in the recovery operation request. The embodiments of the present application do not limit this, and those skilled in the art can selectively set it according to actual needs.
[0079] The candidate recovery request type and the recovery request type are both used to indicate the type of the recovery process initiated. The candidate recovery request type and the recovery request type may include at least one of retry or rollback.
[0080] The candidate operation data is used to represent the operation data of the failed resource object, and may include the resource object (such as a name or identifier), the operation type, and the operation result.
[0081] A match indicates that the data is identical or meets the requirements of a preset regular expression. For example, if a virtual resource operation has five possible results, and three of them follow the same recovery process, a regular expression can be used for matching.
[0082] It is understood that the method further comprises: In response to a failure in executing an operation in a target operation chain, obtaining recovery operation data of the target operation chain; Update the recovery operation data to the operation data and jump to the step of matching the operation data of the target VNF with the resource operation rule knowledge chain set to determine the target operation chain.
[0083] By automatically repeating the corresponding steps of the recovery operation request, the convenience of operation after the operation fails can be further ensured.
[0084] It can be understood that the resource operation rule knowledge chain set includes a retry operation rule knowledge sub-chain set and a fallback operation rule knowledge sub-chain set. The retry operation rule knowledge sub-chain set and the fallback operation rule knowledge sub-chain set each include candidate operation data and candidate operation chains. The operation data for the target VNF is matched with the preset resource operation rule knowledge chain set to determine the target operation chain, including one of the following: In response to the restore operation request characterizing the rollback operation, the operation data is matched with the candidate operation data of each candidate operation rule knowledge chain in the rollback operation rule knowledge sub-chain set to determine the target operation chain; In response to the recovery operation request characterizing the retry operation, the operation data is matched with the candidate operation data of each candidate operation rule knowledge chain in the retry operation rule knowledge sub-chain set to determine a target operation chain.
[0085] By saving different sets of operation rule knowledge sub-chains for different recovery request types, the matching efficiency under each recovery request type can be improved.
[0086] For example, refer to Figure 6 An embodiment of the VNF resource processing method of the embodiment of the present application is shown, and the specific steps are as follows: S1: Deliver virtual resource operations to the target VNF.
[0087] S2. Determine whether the resource operation is successful. If successful, end the task of virtual resource operation. Otherwise, jump to S3.
[0088] S3. Record the operation data of all resource objects involved in the current target operation, where the operation data includes the resource object type and name, the resource object identifier (obtained if it exists), the resource object operation type and result, and the resource object status (obtained if it exists). In some embodiments, the resource object identifier and resource object status do not need to be recorded.
[0089] S4. Obtain a recovery operation request, where the recovery operation request may be for a retry or rollback operation. When the recovery operation request is for a retry operation, jump to S5.1; when the recovery operation request is for a rollback operation, jump to S5.2.
[0090] S5.1. Matching the retry rule knowledge sub-chain set: The specific steps are as follows: Match the operation data recorded in S3 with the retry rule knowledge sub-chain set to obtain the target knowledge chain.
[0091] S5.2. Matching the fallback rule knowledge sub-chain set: The specific steps are as follows: Match the operation data recorded in S3 with the fallback rule knowledge sub-chain set to obtain the target knowledge chain.
[0092] S6. Dynamically generate the next resource processing content based on the target knowledge chain, and jump to S1 to issue all operations of the target knowledge chain as virtual resource operations. If all operations of the target knowledge chain are successful, the process ends. Otherwise, the operation data of the failed operation is recorded again and used for the next retry or fallback operation until the resource operation is successful. For example, if the target knowledge chain of the original virtual resource operation A includes step1~step3, the resource processing content including step1~step3 will be generated first, and jump to S1. When there is failed content in step1~step3, the failed operation data will be updated to the operation data of the target operation A, and the target knowledge chain will be re-matched based on the updated operation data.
[0093] It is understandable that referring to Figure 7 As shown, an embodiment of the present application further provides a network device, including: at least one processor 701; At least one memory 702 is used to store at least one program, and when the at least one program is executed by the at least one processor 701, the above method is implemented.
[0094] The memory 702 is a non-transient network system that can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory 702 may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 702 may optionally include a memory 702 remotely located relative to the processor 701, and these remote memories 702 may be connected to the processor 701 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0095] The memory 702 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 702 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 702 and is called by the processor 701 to execute the methods of the embodiments of this application.
[0096] The processor 701 can be implemented using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.
[0097] In some embodiments, the network device further comprises: Input / output interface 703, used to implement information input and output; Communication interface 704, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.); A bus that transmits information between various components of the device (e.g., processor 701, memory 702, input / output interface 703, and communication interface 704); The processor 701 , the memory 702 , the input / output interface 703 and the communication interface 704 can be communicatively connected to each other within the device via a bus.
[0098] An embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions for executing the above method.
[0099] An embodiment of the present application also provides a computer program product, including a computer program or computer instructions, which are stored in a computer-readable storage medium. The processor of the network device reads the computer program or computer instructions from the computer-readable storage medium, and the processor of the network device executes the computer program or computer instructions, so that the computer device performs the above method.
[0100] The system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of the system architecture and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are equally applicable to similar technical problems.
[0101] Those skilled in the art will appreciate that all or some of the steps and systems disclosed above can be implemented as software, firmware, hardware, or any suitable combination thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on computer-readable media, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is well known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVDs) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0102] The above description of some embodiments of the present application with reference to the accompanying drawings does not limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention shall be within the scope of the present application.
Claims
1. A method for processing resources of a virtualized network function (VNF), the method comprising: In response to receiving a recovery operation request for a target VNF after an operation failure, matching the operation data of the target VNF with a resource operation rule knowledge chain set to determine a target operation chain, the target operation chain including at least one operation for a resource object; Execute each operation in the target operation chain.
2. The VNF resource processing method according to claim 1, characterized in that: The method further comprises: Obtain dependent resource data corresponding to the target operation request for the target VNF; Determining, based on the dependent resource data, a candidate operation chain corresponding to the target operation request; The candidate operation chains are stored in the initial resource operation rule knowledge chain set to obtain the resource operation rule knowledge chain set.
3. The VNF resource processing method according to claim 2, characterized in that: The obtaining of dependent resource data corresponding to the target operation request includes: Extracting, from the preset business resource demand data, a recovery operation type to be performed after the target operation corresponding to the target operation request fails, and a target resource object corresponding to the recovery operation type; The dependent resource data is determined according to the target resource object and the recovery operation type.
4. The VNF resource processing method according to claim 3, characterized in that: Extracting, from the preset business resource demand data, a recovery operation type to be performed after a target operation corresponding to the target operation request fails, and a target resource object corresponding to the recovery operation type, includes: extracting target resource objects under at least one operation type from the business resource demand data according to a preset operation type traversal rule; and traversing the target resource objects under each operation type respectively; The determining the dependent resource data according to the target resource object and the recovery operation type includes: determining the dependent resource data according to the traversed operation type and the target resource object.
5. The VNF resource processing method according to claim 2, characterized in that: The obtaining of dependent resource data corresponding to the target operation request includes: Extracting a target resource object and a target operation type corresponding to the target resource object from the operation request data corresponding to the target operation request; Determining a recovery operation type of the target resource object according to the target operation type; The dependent resource data is determined according to the target resource object and the recovery operation type.
6. The VNF resource processing method according to claim 3 or 5, characterized in that: The dependent resource data includes at least one dependent resource object and a dependency relationship corresponding to the dependent resource object; The determining, based on the dependent resource data, a candidate operation chain corresponding to the target operation request includes: From each of the dependency relationships, respectively determine a target dependency relationship in which the dependency resource objects matching each of the target resource objects correspond one to one when they have the same recovery operation type; Determining, based on each target dependency, an execution order between the recovery operation consisting of the corresponding target resource object and the recovery operation type and the recovery operations corresponding to the remaining target resource objects; The candidate operation chain is obtained according to the execution sequence, the target resource object and the recovery operation type.
7. The VNF resource processing method according to claim 1, characterized in that: Each candidate operation rule knowledge chain in the resource operation rule knowledge chain set includes a candidate recovery request type, candidate operation data, and a candidate operation chain. Matching the operation data of the target VNF with the resource operation rule knowledge chain set to determine the target operation chain includes: Determining a recovery request type of the recovery operation request; Matching the recovery request type with each of the candidate recovery request types and matching the operation data with each of the candidate operation data; In response to the candidate operation data and candidate recovery request type in the same candidate operation rule knowledge chain matching the operation data and the recovery request type respectively, the matching candidate operation chain in the candidate operation rule knowledge chain is used as the target operation chain.
8. The VNF resource processing method according to claim 2, characterized in that: The step of storing the candidate operation chain in the initial resource operation rule knowledge chain set to obtain the resource operation rule knowledge chain set includes: In response to detecting business resource demand data in the target operation request, determining a candidate recovery request type from the business resource demand data; In response to not detecting the business resource demand data in the target operation request, determining the preset operation type as a candidate recovery request type; The candidate operation chain is bound to the corresponding candidate recovery request type and stored as a candidate operation rule knowledge chain in the initial resource operation rule knowledge chain set to obtain the resource operation rule knowledge chain set.
9. The VNF resource processing method according to claim 1, characterized in that: The method further comprises: In response to a failure in executing an operation in the target operation chain, obtaining recovery operation data of the target operation chain; Update the recovery operation data into the operation data and jump to the step of matching the operation data of the target VNF with the resource operation rule knowledge chain set to determine the target operation chain.
10. The VNF resource processing method according to claim 1, wherein: The resource operation rule knowledge chain set includes a retry operation rule knowledge sub-chain set and a fallback operation rule knowledge sub-chain set, each of the retry operation rule knowledge sub-chain set and the fallback operation rule knowledge sub-chain set includes candidate operation data and candidate operation chains, and matching the operation data of the target VNF with the resource operation rule knowledge chain set to determine the target operation chain includes one of the following: In response to the restore operation request representing the rollback operation, the operation data is matched with the candidate operation data of each candidate operation rule knowledge chain in the rollback operation rule knowledge sub-chain set to determine a target operation chain; In response to the recovery operation request representing a retry operation, the operation data is matched with the candidate operation data of each candidate operation rule knowledge chain in the retry operation rule knowledge sub-chain set to determine a target operation chain.
11. A computer-readable storage medium storing computer-executable instructions, wherein when the computer-executable instructions are executed by a processor, the processor implements the resource processing method for virtualized network functions according to any one of claims 1 to 10.
12. A computer program product, comprising a computer program or computer instructions, wherein the computer program or the computer instructions are stored in a computer-readable storage medium, a processor of a network device reads the computer program or the computer instructions from the computer-readable storage medium, and the processor executes the computer program or the computer instructions, so that the network device executes the resource processing method for virtualized network functions as described in any one of claims 1 to 10.