A virtual network element processing method, device and electronic equipment

Concurrent creation is achieved by using kilim queues and pausable execution functions during the virtual network element creation process, and abstracting subtask dependencies through directed graphs, the problem of low efficiency and high complexity of virtual network element creation in the existing technology is solved. Achieve efficient and stable virtual network element creation.

CN113472557BActive Publication Date: 2025-02-11ASIAINFO TECH CHINA INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010242689.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-31
Publication Date
2025-02-11
Estimated Expiration
2040-03-31

AI Technical Summary

Technical Problem

When creating virtual network elements, the existing technology is limited by the workflow that executes sequentially, resulting in low creation efficiency and inability to achieve concurrent creation. When the dependencies between subtasks are complex, the program complexity increases and stability decreases. .

Method used

By using the kilim queue to store the virtual network element creation requests and execute the requests in the queue in parallel, the kilim-based pause execution function is used to create virtual network elements concurrently. At the same time, directed graphs are used to abstract the dependencies between subtasks to ensure efficient and orderly execution.

Benefits of technology

The concurrent creation of virtual network elements is realized, which avoids time consumption caused by sequential execution, improves the creation efficiency of virtual network elements, and reduces program complexity and failure rate by simplifying business logic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113472557B_ABST
    Figure CN113472557B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device and electronic device for processing a virtual network element, the method comprising: obtaining an instantiation request, the instantiation request at least comprising template information, the template information being template information of at least one virtual network element to be created; obtaining creation resource information according to the template information, the creation resource information at least comprising resource requirement information corresponding to each virtual network element to be created; generating a creation request corresponding to each virtual network element to be created according to the resource requirement information; adding the creation request corresponding to each virtual network element to be created to a preset kilim queue respectively; for each creation request in the kilim queue, creating the virtual network element corresponding to each creation request in parallel using a kilim-based pausable execution function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of network function virtualization, and in particular to a virtual network element processing method, device and electronic device. Background Art

[0002] The main goal of Network Function Virtualization (NFV) is to achieve the separation of software and hardware, that is, to use virtualization technology to implement the functions of proprietary network devices on highly versatile hardware devices. The main implementation method is to create more virtual network elements (VNFs), also known as virtualized network elements, such as virtual machines, on hardware devices to achieve more comprehensive network function virtualization.

[0003] At present, after parsing the virtual network element template, the required resource operations can be defined as code blocks, and then the main control process controls the sequential execution to realize the creation of virtual network elements; or, the process of creating virtual network elements can be organized into activiti workflows, and then executed sequentially to realize the creation of virtual network elements, and so on.

[0004] It can be seen that the current solution for creating a virtual network element is to create the next virtual network element in a certain order after the previous virtual network element is created. This implementation solution of sequentially executing virtual network element creation will obviously make the efficiency of virtual network element creation low. Summary of the invention

[0005] In view of this, the present application provides a virtual network element processing method, device and electronic device as follows:

[0006] A method for processing a virtual network element, the method comprising:

[0007] Obtaining an instantiation request, where the instantiation request at least includes template information, where the template information is template information of at least one virtual network element to be created;

[0008] According to the template information, obtaining creation resource information, the creation resource information at least including resource requirement information corresponding to each virtual network element to be created;

[0009] Generate a creation request corresponding to each virtual network element to be created according to the resource demand information;

[0010] Adding the creation request corresponding to each virtual network element to be created to the preset kilim queue respectively;

[0011] For each of the creation requests in the kilim queue, a kilim-based suspendable execution function is used to create a virtual network element corresponding to each of the creation requests in parallel.

[0012] The above method preferably, for each of the creation requests in the kilim queue, using a kilim-based suspendable execution function to create in parallel a virtual network element corresponding to each of the creation requests, includes:

[0013] At least one kilim-based suspendable execution function is called in parallel, so as to use each of the suspendable execution functions to respectively target a creation request in the kilim queue and create a virtual network element corresponding to each creation request.

[0014] In the above method, preferably, the creation request is represented by a directed graph, the nodes in the directed graph represent the creation subtasks of the virtual network element to be created, and the direction information between the nodes represents the dependency relationship between the creation subtasks.

[0015] In the above method, preferably, the parallel calling of at least one kilim-based suspendable execution function, so as to use each of the suspendable execution functions to respectively create a creation request in the kilim queue, and create a virtual network element corresponding to each creation request, including:

[0016] At least one kilim-based suspendable execution function is called in parallel, so as to utilize each of the suspendable execution functions to execute the creation operations corresponding to the creation subtasks corresponding to each of the nodes in the directed graph in sequence according to the direction information between the nodes in the directed graph corresponding to the creation request corresponding to the kilim queue, and utilize each of the suspendable execution functions to create the virtual network element corresponding to each of the creation requests according to the creation results corresponding to each of the creation subtasks in each of the directed graphs.

[0017] In the above method, preferably, the sequentially executing the creation operation corresponding to the creation subtask corresponding to each node in the directed graph includes:

[0018] Sending a resource request to a resource server in turn according to the creation subtask corresponding to each node in the directed graph, so that the resource server creates a target resource corresponding to the resource request; each creation subtask corresponds to one resource request;

[0019] A creation result of the target resource created by the resource server for each resource request is obtained, where the creation result includes the target resource and / or a resource identifier of the target resource.

[0020] The above method preferably adds the creation request corresponding to each virtual network element to be created to a preset kilim queue, including:

[0021] The kilim-based queue processing function is called so that the creation request corresponding to each virtual network element to be created is added to the preset kilim queue.

[0022] A virtual network element processing device, the device comprising:

[0023] A request obtaining unit, configured to obtain an instantiation request, wherein the instantiation request at least includes template information, and the template information is template information of at least one virtual network element to be created;

[0024] A demand obtaining unit, configured to obtain creation resource information according to the template information, wherein the creation resource information at least includes resource demand information corresponding to each virtual network element to be created;

[0025] A request generating unit, configured to generate a creation request corresponding to each virtual network element to be created according to the resource requirement information;

[0026] A queue processing unit, used for adding the creation request corresponding to each virtual network element to be created to a preset kilim queue;

[0027] The network element creation unit is used to create, for each creation request in the kilim queue, a virtual network element corresponding to each creation request in parallel by using a kilim-based suspendable execution function.

[0028] In the above device, preferably, the creation request is represented by a directed graph, in which nodes are used to represent the creation subtasks of the virtual network element to be created, and direction information between the nodes is used to represent the dependency relationship between the creation subtasks;

[0029] Wherein, the network element creation unit includes:

[0030] A function calling module, used for calling at least one kilim-based suspendable execution function in parallel;

[0031] An operation execution module, used to use each of the suspendable execution functions to sequentially execute the creation operation corresponding to the creation subtask corresponding to each of the nodes in the directed graph according to the direction information between the nodes in the directed graph corresponding to the creation request corresponding to the kilim queue;

[0032] The network element creation module is used to create a virtual network element corresponding to each creation request according to the creation result corresponding to each creation subtask in each directed graph by using each of the suspendable execution functions.

[0033] In the above-mentioned device, preferably, the operation execution module is specifically used to: respectively use each of the pausable execution functions to send a resource request to the resource server according to the creation subtask corresponding to each of the nodes in the directed graph corresponding to it, so that the resource server creates the target resource corresponding to the resource request; each of the creation subtasks corresponds to one of the resource requests; obtain the creation result of the resource server creating the target resource for each of the resource requests, and the creation result includes the target resource and / or the resource identifier of the target resource.

[0034] An electronic device, comprising:

[0035] A memory, used to store applications and data generated by the operation of the applications;

[0036] A processor is used to execute the application to achieve: obtaining an instantiation request, the instantiation request at least including template information, the template information being template information of at least one virtual network element to be created; obtaining creation resource information according to the template information, the creation resource information at least including resource requirement information corresponding to each virtual network element to be created; generating a creation request corresponding to each virtual network element to be created according to the resource requirement information; adding the creation request corresponding to each virtual network element to be created to a preset kilim queue respectively; for each creation request in the kilim queue, creating the virtual network element corresponding to each creation request in parallel using a kilim-based pausable execution function.

[0037] It can be seen from the above technical scheme that in a virtual network element processing method, device and electronic device disclosed in the present application, after obtaining the instantiation request, according to the template information of the virtual network element to be created contained in the instantiation request, the creation resource information is parsed and obtained, which contains the resource requirement information corresponding to each virtual network element to be created, and further according to the resource requirement information, the creation request corresponding to each virtual network element to be created is generated, and then, the creation request corresponding to each virtual network element to be created is added to the preset kilim queue respectively, and finally, for each creation request in the kilim queue, the virtual network element corresponding to each creation request is created in parallel using the kilim-based suspendable execution function. It can be seen that in the present application, by adding the creation request corresponding to each virtual network element to be created to the kilim queue respectively, the virtual network element corresponding to each creation request can be created in parallel using the kilim-based suspendable execution function for each creation request in the kilim queue, thereby realizing concurrent creation, avoiding the time consumption caused by creation in the workflow sequence, and thus improving the creation efficiency of virtual network elements. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0039] Figure 1 This is the scenario architecture diagram applicable to this application;

[0040] Figure 2-Figure 5 They are schematic diagrams of directed graphs respectively;

[0041] Figure 6 A flowchart of a method for implementing a virtual network element processing provided in Embodiment 1 of the present application;

[0042] Figure 7 A schematic diagram of a unidirectional connected graph of a directed graph in an embodiment of the present application;

[0043] Figure 8 This is an example diagram of the kilim queue in an embodiment of the present application;

[0044] Fig. 9 A schematic diagram of implementing virtual network element creation based on the kilim queue in an embodiment of the present application;

[0045] Fig.10 A schematic diagram of the structure of a virtual network element processing device provided in Embodiment 2 of the present application;

[0046] Fig.11 A partial structural diagram of a virtual network element processing device provided in Embodiment 2 of the present application;

[0047] Fig.12 A schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present application;

[0048] Fig.13 This is a schematic diagram of executing TASK in parallel according to an embodiment of the present application. DETAILED DESCRIPTION

[0049] With the implementation of 5G large-scale network construction and application demonstration projects, the operation and maintenance of 5G networks has also been put on the agenda. An important feature of 5G networks is full cloudification, that is, the 5G core network needs to be based on a fully virtualized architecture. In the deployment of virtualized network elements, NFV MANO (Management and Orchestratration) is at the core. Figure 1As shown in the architecture diagram in . Among them, when the network function virtual orchestrator NFVO (Network Functions Virtualisation Orchestrator) issues an instantiation request to indicate the need to create virtualized network elements such as virtual machines, based on the resource support in the resource management platform VIM (Virtualised Infrastructure Managers), the separation of software and hardware is achieved through VNFM (Network Function Virtualization Manager), and virtualization technology is used to create more VNFs: VNF1-VNF3 on the basis of hardware resources such as highly versatile storage devices, computing devices and network devices through virtualized devices, thereby achieving comprehensive network function virtualization.

[0050] The inventors of the present application discovered during research and development that there are currently several main solutions for realizing the creation of virtual network elements. For example, after parsing VNFD (Network Function Virtualization Damo), the parsed creation required is defined as code blocks, and the main control process controls the sequential execution of these code blocks to realize the creation of virtual network elements corresponding to each code block; for another example, the process of creating virtual network elements is organized into an activiti workflow, which is executed in order of workload to realize the creation of virtual network elements; for another example, the SpiffWorkFlow workflow is used in combination with the openstackclient component to perform sequential execution of resources to realize the creation of virtual network elements.

[0051] It can be seen that the above solutions for centralized instantiation of virtual network elements all have a common defect: the workflow is executed sequentially, and the tasks in the workflow need to be calculated in advance and scheduled by the workflow engine. Therefore, these solutions cannot create a large number of virtual network elements concurrently, and when there are too many dependencies between subtasks in a creation role, the business logic cannot be abstracted, resulting in complex programs, easy to cause failures, and unstable instantiation processes.

[0052] After further research, the inventor of this application proposed a kilim-based virtual network element generation scheme, in which the kilim queue is used to store requests for creating virtual network elements, and then the requests in the queue are executed in parallel, thereby realizing a large number of concurrent creation of virtual network elements. In this process, a directed graph is used to abstract the business logic between subtasks in the process of creating a large number of concurrent virtual network elements. The details are as follows:

[0053] First, after obtaining the instantiation request, the creation resource information is parsed and obtained according to the template information of the virtual network element to be created contained in the instantiation request, which includes the resource requirement information corresponding to each virtual network element to be created, and further according to the resource requirement information, a creation request corresponding to each virtual network element to be created is generated, and then, each creation request corresponding to the virtual network element to be created is added to the preset kilim queue respectively, for example, a kilim-based queue processing function is called, so that the creation request corresponding to each virtual network element to be created is added to the preset kilim queue, and finally, for each creation request in the kilim queue, the kilim-based pausable execution function is used to create the virtual network element corresponding to each creation request in parallel.

[0054] In a specific implementation, at least one kilim-based suspendable execution function may be called in parallel, so that each suspendable execution function is used to respectively target a creation request in the kilim queue, and a virtual network element corresponding to each creation request is created.

[0055] Furthermore, the creation request is represented by a directed graph, in which nodes represent the creation subtasks of the virtual network elements to be created, and direction information between the nodes represents the dependency relationship between the creation subtasks.

[0056] Based on this, when creating a virtual network element, at least one kilim-based suspendable execution function can be called in parallel, so that each suspendable execution function can be used to execute the creation operation corresponding to the creation subtask of each node in the directed graph in sequence according to the direction information between the nodes in the directed graph corresponding to the creation request corresponding to it in the kilim queue, and each suspendable execution function can be used to create the virtual network element corresponding to each creation request according to the creation result corresponding to each creation subtask in each directed graph.

[0057] Among them, when using the pausable execution function to sequentially execute the creation operation corresponding to the creation subtask corresponding to each node in the directed graph, the resource request can be first sent to the resource server in sequence according to the creation subtask corresponding to each node in the directed graph, so that the resource server creates the target resource corresponding to the resource request; each creation subtask corresponds to a resource request; then, the creation result of the resource server creating the target resource for each resource request is obtained, and the creation result includes the target resource and / or the resource identifier of the target resource.

[0058] It can be seen that in the solution proposed by the inventor of the present application, by adding the creation requests corresponding to each virtual network element to be created to the kilim queue respectively, the virtual network element corresponding to each creation request in the kilim queue can be created in parallel by using the kilim-based pausable execution function, thereby realizing concurrent creation and avoiding the time consumption caused by creation in the order of the workflow, thereby improving the creation efficiency of the virtual network elements.

[0059] Before introducing the implementation scheme of the present application in detail, the kilim technology and directed graph related contents involved in the present application are first introduced as follows:

[0060] First of all, the application of kilim technology in this application is mainly reflected in the feature of kilim non-blocking programming. In kilim, bytecode technology can be used to convert ordinary code into code that supports kilim coroutines. When calling suspendable execution methods such as Pauseable methods for these codes, if the method is paused, the state of the current method stack is saved, the execution of the current task is suspended, and the control is handed over to the scheduler. The Scheduler is responsible for coordinating other ready Tasks. When the previously paused Task is resumed, the previously paused State can be automatically restored to the position where the last Pauseable method was executed and continue execution;

[0061] It can be seen that the basic principle of kilim is that kilim weaves bytecodes at compile time, processes bytecodes for each pauseable method (Pauseable), and adds relevant execution context processing before and after the method is executed. When pausing, the entire thread stack will be saved, and then goto will be jumped to the execution method of another Task through a specific bytecode jump instruction. When resuming, the entire thread stack will be restored and the execution will continue to the position of the last pause.

[0062] Based on this, in this application, the feature of Kilim's non-blocking programming is used to achieve the effect of concurrently creating virtual network elements to provide performance and stability.

[0063] From the above, although the task packages corresponding to the instantiation request are all placed in the queue for execution, such a queue is not executed in a stop-and-wait manner, but is executed concurrently. Specifically, there may be a sequence in the triggering timing (the triggering timing can also be carried out simultaneously), but it will not wait for the execution to end before triggering the execution of the next task. Instead, after triggering a task to start execution, the processor resources are immediately released to trigger the execution of the next task, thereby greatly improving the program performance and reducing invalid waiting. How to confirm whether the next task can be executed involves the abstraction of each subtask in the task and the determination of the execution order.

[0064] Secondly, the application of directed graphs in this application is mainly reflected in the fact that there is directional information between the nodes of the directed graph, which represents the business logic between the nodes. The content of the directed graph is as follows:

[0065] A directed graph D is an ordered triple (V(D), A(D), ψD), where ψ(D) is the correlation function, which makes each element in A(D) (called a directed edge or arc) correspond to an ordered pair of elements (called vertices or points or nodes) in V(D). The connectivity of directed graphs is divided into three types: strong connectivity, unidirectional connectivity and weak connectivity. Figure 2-Figure 5 The four types of directed graphs shown in are: strongly connected graph, unidirectional connected graph, weakly connected graph and non-weakly connected graph.

[0066] Considering the characteristics of instantiating and creating virtual network elements, the execution of the subtasks corresponding to the next node with dependencies requires the successful execution results of the subtasks of the previous node. Therefore, a unidirectionally connected directed graph is used in this application to characterize the dependencies between the creation subtasks corresponding to the creation request. In the unidirectionally connected graph, each node represents each creation subtask in the task of creating the corresponding virtual network element, and the direction information between the nodes is used to represent the dependencies between the related creation subtasks. Based on this, in this application, these directed graphs that have been created to represent the dependencies between the creation subtasks are placed in the kilim queue for concurrent execution, so as to achieve efficient and orderly execution of each creation subtask in the instantiation, so as to create the resources required for the instantiation, thereby realizing the creation of virtual network elements.

[0067] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0068] like Figure 6As shown, it is a flowchart of a method for processing a virtual network element provided in the first embodiment of the present application, which is applicable to electronic devices that can be connected to a variety of hardware devices and can process data, such as computers or servers, so as to instantiate virtual network elements based on a variety of hardware devices, such as creating virtual network elements such as virtual machines. The technical solution in the present application is mainly used to improve the efficiency of creating virtual network elements.

[0069] In a specific implementation, the method in this embodiment can be applied to Figure 1 In the VNFM, the following steps may be included:

[0070] Step 601: Obtain an instantiation request.

[0071] The instantiation request refers to a request for creating one or more virtual network elements, and the instantiation request includes at least template information, where the template information is template information of a VNFD of at least one virtual network element to be created.

[0072] It should be noted that the instantiation request in this embodiment may be a request sent by the NFVO and received by the VNFM.

[0073] Step 602: Obtain creation resource information according to the template information.

[0074] Among them, the creation resource information may include the number of virtual network elements to be created, where the number represents the virtual function specifications that need to be created for the current instantiation request, for example, the current instantiation request needs to create 3 virtual machines or needs to create 50 virtual machines, etc.; the creation resource information also includes: resource requirement information corresponding to each virtual network element to be created, the resource requirement information represents the resource type and related quantity or content and other attribute information required for the creation of the corresponding virtual network element to be created, for example, the creation of a virtual network element requires virtual machine template (flavor) resources, cloud disk (volume) resources, port resources, network (network) resources, subnet (subnetwork) resources, etc. At this time, these required resource information constitute the creation resource information corresponding to the virtual network element.

[0075] In a specific implementation, the VNFM in this embodiment can parse the VNFD in the instantiation request to obtain the resource requirement information of each virtual network element to be created represented in the template information.

[0076] Step 603: Generate a creation request corresponding to each virtual network element to be created according to the resource demand information.

[0077] In this embodiment, a creation request corresponding to the virtual network element to be created may be generated according to each resource requirement in the resource requirement information.

[0078] In the specific implementation, this embodiment can construct corresponding nodes according to each resource requirement in the resource requirement information, and then construct these nodes into a one-way connected graph, that is, a directed graph, according to the creation dependency relationship between the various resource requirements. At this time, this embodiment uses the directed graph to represent the creation request corresponding to the virtual network element to be created.

[0079] It should be noted that the creation dependency relationship between various resource requirements refers to a dependency relationship in which the creation of one resource requirement requires the creation of another resource requirement first.

[0080] like Figure 7 As shown in , the creation request is represented by a directed graph, which is a unidirectional connected graph. There are multiple nodes AE in the directed graph, and the nodes represent the creation subtasks of the virtual network elements to be created. There are connecting lines between the nodes, and the connecting lines have directions. In the directed graph, the direction information between the nodes is used to represent the dependency relationship between the creation subtasks. For example, the execution of creation subtask A depends on the successful creation of creation subtask B.

[0081] Step 604: Add the creation request corresponding to each virtual network element to be created to the preset kilim queue respectively.

[0082] Specifically, in this embodiment, the queue processing function based on kilim can be called so that the creation request corresponding to each virtual network element to be created is added to the preset kilim queue. For example, in this embodiment, the queue processing function based on kilim is called, and then the queue processing function based on kilim is used to add the creation request corresponding to each virtual network element to be created to the kilim queue (the queue of the kilim coroutine).

[0083] It should be noted that the kilim queue can have multiple coroutine queues: 1-3, and each coroutine queue has a create request, and each coroutine queue stores multiple create subtasks corresponding to the corresponding create request. These create subtasks are represented by nodes in a directed graph, and the dependency between the create subtasks is represented by the direction information between the nodes in the corresponding directed graph, such as Figure 8 As shown in , each coroutine queue in the kilim queue stores multiple nodes in the directed graph corresponding to the corresponding creation request, and the nodes represent the direction information between the nodes through the address pointers between the nodes.

[0084] Step 605: For each creation request in the kilim queue, a virtual network element corresponding to each creation request is created in parallel.

[0085] Among them, in this embodiment, for each creation request saved in each coroutine queue in the kilim queue, a kilim-based suspendable execution function, such as a function of the Pauseable method, is triggered to call, so as to create a virtual network element corresponding to each creation request using the triggered suspendable execution function, such as Fig. 9 middle.

[0086] In a specific implementation, VNFM can call multiple kilim-based suspendable execution functions in parallel, where each called kilim-based suspendable execution function corresponds to a creation request in a coroutine queue. Thus, VNFM can use each suspendable execution function to execute the creation operation corresponding to the creation subtask corresponding to each node in the directed graph in sequence according to the direction information between the nodes in the directed graph corresponding to the creation request corresponding to the kilim queue, and use each suspendable execution function to create the virtual network element corresponding to each creation request according to the creation result corresponding to each creation subtask in each directed graph.

[0087] That is, each kilim-based suspendable function called by VNFM performs the following processing:

[0088] The kilim-based suspendable execution function follows the direction information between the nodes in the directed graph corresponding to the corresponding create request in the kilim queue, for example, Figure 7 The kilim-based suspendable execution function is used to create a virtual network element corresponding to the corresponding creation request according to the creation result corresponding to each creation subtask in the directed graph.

[0089] In the process of VNFM using the kilim-based suspendable execution function to sequentially execute the creation operation corresponding to the creation subtask of each node in the directed graph, it can be specifically implemented in the following ways:

[0090] VNFM uses a pausable execution function based on kilim to send resource requests to the resource server in turn according to the creation subtask corresponding to each node in the directed graph, so that the resource server creates the target resource corresponding to the resource request; each creation subtask corresponds to a resource request; then, VNFM uses a pausable execution function based on kilim to obtain the creation result of the resource server creating the target resource for each resource request, wherein the creation result includes the target resource and / or the resource identifier of the target resource.

[0091] In a specific implementation, the above resource server can be a network resource server connected through a network, or a resource platform in the cloud. After the resource server receives the resource request, it can respond immediately. The response mode can be a synchronous response mode and an asynchronous response mode. Among them, in the synchronous response mode, after the resource server receives the resource request, the resource server immediately creates the corresponding target resource according to the resource request and returns the creation result to the VNFM, and the creation result includes the created target resource; in the asynchronous response mode, after the resource server receives the resource request, the resource server can return the resource identifier of the target resource to the VNFM, that is, the creation result, and the resource status of the target resource indicates that it may not be used immediately temporarily. In the process of calling the kilim-based suspendable execution function to create a virtual network element, the VNFM continuously queries the resource status of the target resource according to the resource identifier of the target resource in the creation result until the resource status of the target resource is normal, and the VNFM uses these target resources to create a virtual network element.

[0092] After receiving the creation result corresponding to each creation subtask corresponding to a creation request, VNFM uses the kilim-based suspendable execution function to create a virtual network element corresponding to the corresponding creation request according to the creation result corresponding to each creation subtask in the directed graph, which can be specifically implemented in the following ways:

[0093] VNFM uses the kilim-based suspendable execution function to determine that the creation results corresponding to each creation subtask in the directed graph indicate that the target resources corresponding to the resource requests corresponding to each creation subtask are successfully created. At this time, VNFM uses the kilim-based suspendable execution function to create the virtual network element corresponding to the directed graph; and if the target resource corresponding to a certain creation subtask is not successfully created, VNFM uses the kilim-based suspendable execution function to continue waiting for the target resource to be successfully created and create the virtual network element, or if the creation of a target resource fails, the creation of the virtual network element corresponding to the directed graph fails.

[0094] If the VNFM determines that the virtual network elements corresponding to all creation requests are successfully created, then the virtual network elements for the instantiation request are successfully created; if the VNFM determines that the virtual network elements corresponding to one or more creation requests fail to be created, then the virtual network elements for the instantiation request fail to be created.

[0095] It can be seen from the above technical scheme that in a virtual network element processing method of the first embodiment of the present application, after obtaining the instantiation request, according to the template information of the virtual network element to be created contained in the instantiation request, the creation resource information is parsed and obtained, which contains the resource requirement information corresponding to each virtual network element to be created, and further according to the resource requirement information, the creation request corresponding to each virtual network element to be created is generated, and then, the creation request corresponding to each virtual network element to be created is added to the preset kilim queue respectively, and finally, for each creation request in the kilim queue, the virtual network element corresponding to each creation request is created in parallel using the kilim-based suspendable execution function. It can be seen that in this embodiment, by adding the creation request corresponding to each virtual network element to be created to the kilim queue respectively, the virtual network element corresponding to each creation request can be created in parallel using the kilim-based suspendable execution function for each creation request in the kilim queue, thereby realizing concurrent creation, avoiding the time consumption caused by creation in the workflow sequence, and thus improving the creation efficiency of virtual network elements.

[0096] refer to Fig.10 , is a schematic diagram of the structure of a virtual network element processing device provided in Embodiment 2 of the present application. The device can be configured in an electronic device that can be connected to a variety of hardware devices and can perform data processing, such as a computer or a server, etc., such as a virtual network element processing device configured in a server. Figure 1 The VNFM in the present invention is used to instantiate virtual network elements based on various hardware devices, such as creating virtual network elements such as virtual machines. The technical solution in this application is mainly used to improve the efficiency of creating virtual network elements.

[0097] In a specific implementation, the device in this embodiment may include the following steps:

[0098] The request obtaining unit 1001 is used to obtain an instantiation request, where the instantiation request at least includes template information, where the template information is template information of at least one virtual network element to be created;

[0099] The demand obtaining unit 1002 is used to obtain creation resource information according to the template information, where the creation resource information at least includes resource demand information corresponding to each virtual network element to be created;

[0100] The request generating unit 1003 is used to generate a creation request corresponding to each virtual network element to be created according to the resource requirement information;

[0101] The creation request is represented by a directed graph, in which nodes represent the creation subtasks of the virtual network element to be created, and the direction information between the nodes represents the dependency relationship between the creation subtasks;

[0102] The queue processing unit 1004 is used to add the creation request corresponding to each virtual network element to be created to a preset kilim queue;

[0103] The network element creation unit 1005 is used to create a virtual network element corresponding to each creation request in parallel for each creation request in the kilim queue.

[0104] Among them, Fig.11 As shown in , the network element creation unit 1005 may include the following structure:

[0105] A function calling module 1101 is used to call at least one kilim-based suspendable execution function in parallel;

[0106] The operation execution module 1102 is used to use each suspendable execution function to sequentially execute the creation operation corresponding to the creation subtask corresponding to each node in the directed graph according to the direction information between the nodes in the directed graph corresponding to the creation request corresponding to the kilim queue;

[0107] Among them, the operation execution module 1102 is specifically used to: use each pausable execution function in turn according to the creation subtask corresponding to each node in the directed graph corresponding to it, send a resource request to the resource server, so that the resource server creates the target resource corresponding to the resource request; each creation subtask corresponds to a resource request; obtain the creation result of the resource server creating the target resource for each resource request, and the creation result includes the target resource and / or the resource identifier of the target resource.

[0108] The network element creation module 1103 is used to create a virtual network element corresponding to each creation request according to the creation result corresponding to each creation subtask in each directed graph by using each suspendable execution function.

[0109] It can be seen from the above technical scheme that in a virtual network element processing device of the second embodiment of the present application, after obtaining the instantiation request, according to the template information of the virtual network element to be created contained in the instantiation request, the creation resource information is parsed and obtained, which contains the resource requirement information corresponding to each virtual network element to be created, and further according to the resource requirement information, the creation request corresponding to each virtual network element to be created is generated, and then, the creation request corresponding to each virtual network element to be created is added to the preset kilim queue respectively, and finally, for each creation request in the kilim queue, the virtual network element corresponding to each creation request is created in parallel using the kilim-based suspendable execution function. It can be seen that in this embodiment, by adding the creation request corresponding to each virtual network element to be created to the kilim queue respectively, the virtual network element corresponding to each creation request can be created in parallel using the kilim-based suspendable execution function for each creation request in the kilim queue, thereby realizing concurrent creation, avoiding the time consumption caused by creation in the workflow sequence, and thus improving the creation efficiency of virtual network elements.

[0110] refer to Fig.12 , is a schematic diagram of the structure of an electronic device provided in the third embodiment of the present application. The electronic device may be an electronic device that can be connected to a variety of hardware devices and can perform data processing, such as a computer or a server, etc. The electronic device is configured with a Figure 6 The method or configuration in Fig.10 The device shown in Figure 1 The VNFM in the present invention is used to instantiate virtual network elements based on various hardware devices, such as creating virtual network elements such as virtual machines. The technical solution in this application is mainly used to improve the efficiency of creating virtual network elements.

[0111] Specifically, the electronic device may include the following structure:

[0112] The memory 1201 is used to store the application program and the data generated by the application program;

[0113] Processor 1202 is used to execute the application program to achieve: obtaining an instantiation request, the instantiation request at least including template information, the template information being template information of at least one virtual network element to be created; obtaining creation resource information according to the template information, the creation resource information at least including resource requirement information corresponding to each virtual network element to be created; generating a creation request corresponding to each virtual network element to be created according to the resource requirement information; adding the creation request corresponding to each virtual network element to be created to a preset kilim queue respectively; and for each creation request in the kilim queue, creating the virtual network element corresponding to each creation request in parallel.

[0114] It can be seen from the above technical scheme that in an electronic device of the third embodiment of the present application, after obtaining the instantiation request, according to the template information of the virtual network element to be created contained in the instantiation request, the creation resource information is parsed and obtained, which contains the resource requirement information corresponding to each virtual network element to be created, and further according to the resource requirement information, the creation request corresponding to each virtual network element to be created is generated, and then, the creation request corresponding to each virtual network element to be created is added to the preset kilim queue respectively, and finally, for each creation request in the kilim queue, the virtual network element corresponding to each creation request is created in parallel using the kilim-based suspendable execution function. It can be seen that in this embodiment, by adding the creation request corresponding to each virtual network element to be created to the kilim queue respectively, the virtual network element corresponding to each creation request can be created in parallel using the kilim-based suspendable execution function for each creation request in the kilim queue, thereby realizing concurrent creation, avoiding the time consumption caused by creation in the workflow sequence, and thus improving the creation efficiency of virtual network elements.

[0115] The following is based on the 5G network. Figure 1 The architecture diagram shown in the figure is used to create a virtual machine VM (Virtual Machine), and a brief example of the technical solution of the present application is given as follows:

[0116] First of all, in this application, the kilim coroutine technology is used to achieve the purpose of creating virtual machines required for instantiation on a large scale concurrently.

[0117] Among them, VNFM parses the template VNFD of the virtual machine required for instantiation in the instantiation request issued by NFVO, so as to obtain the resource situation that needs to be created, including: the number and specifications of the virtual machines that need to be created and other resource requirements, such as virtual machine templates (flavor), cloud disks (volume), networks (network), subnetworks (subnetwork), etc., and then puts the resource creation request (create request) into the kilim coroutine queue, and triggers the automatic concurrent execution of the virtual machine creation task corresponding to the requests in multiple coroutine queues by calling the kilim suspendable execution function.

[0118] Secondly, in the process of concurrently creating virtual machines, this application needs to first interact with cloud platform management software (resource server) such as openstack to realize resource creation, for example, sending a resource request to the cloud platform to request the cloud platform to create target resources to provide to VNFM to facilitate the creation of virtual machines.

[0119] It should be noted that when sending resource requests to the cloud platform to obtain target resources and complete the task of creating a virtual machine, it can be implemented in an orderly and concurrent manner, such as Fig.13 As shown in the figure, multiple creation tasks (creation tasks of virtual machines VM1-VM3 corresponding to the creation request) such as TASK1-TASK3 are in parallel, and there is a dependency relationship between the multiple creation subtasks contained in each creation task, including creating flavors, creating ports, creating cloud disk volumes, etc., which need to be performed in order according to the dependency relationship.

[0120] In this embodiment, a creation task package refers to: creating a single virtual machine and all the prerequisites for creating the virtual machine (creation subtasks). The prerequisites here may include: checking whether it exists, and creating it if it does not exist; checking whether the port exists, and creating it if it does not exist; checking whether the cloud disk exists, and creating it if it does not exist, etc.

[0121] For instantiation requests, each creation task package is in parallel and can be processed using different kilim coroutines (kilim-based suspendable execution functions). Multiple creation subtasks in a creation task package can also be processed using different kilim coroutines. However, the creation of a virtual machine can only be triggered after all dependencies are completed. For example, the operation of binding a virtual machine to a cloud disk can only be executed after the cloud disk is created.

[0122] The end condition of creating a task package is: all creation subtasks are completed, in which case the task package is created successfully; or any subtask fails, in which case the task package is created unsuccessfully;

[0123] The instantiation request, i.e. the successful creation of the VNF, ends when all creation task packages are executed, i.e. all virtual machines are created. If the virtual machine contains a cloud disk, the cloud disk needs to be successfully bound.

[0124] In the specific implementation, the creation subtasks in the same creation task package have execution order requirements. In this application, a directed graph can be used to abstract the creation subtasks of the same creation task package. Each creation subtask is a node in the directed graph, and the triggering condition of each creation subtask is: all nodes on which the creation subtask depends have been completed; that is, there is no upper node pointing to it on the directed graph node corresponding to the creation subtask or the upper node pointing to it has been executed.

[0125] In summary, this application uses the characteristics of Kilim non-blocking programming to achieve the effect of concurrently creating virtual network elements to provide performance and stability. At the same time, this application puts these created directed graphs that can represent the dependencies between creation subtasks into the kilim queue for concurrent execution, thereby achieving efficient and orderly execution of each creation subtask in the instantiation to create the resources required for the instantiation, thereby realizing the creation of virtual network elements.

[0126] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0127] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0128] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0129] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A virtual network element processing method, characterized in that: The method comprises: Obtaining an instantiation request, where the instantiation request at least includes template information, where the template information is template information of at least one virtual network element to be created; According to the template information, obtaining creation resource information, the creation resource information at least including resource requirement information corresponding to each virtual network element to be created; Generate a creation request corresponding to each virtual network element to be created according to the resource demand information; Adding the creation request corresponding to each virtual network element to be created to the preset kilim queue respectively; For each of the creation requests in the kilim queue, using a kilim-based suspendable execution function to create in parallel a virtual network element corresponding to each of the creation requests; Wherein, for each of the creation requests in the kilim queue, using a kilim-based suspendable execution function to create in parallel a virtual network element corresponding to each of the creation requests, including: Calling at least one kilim-based suspendable execution function in parallel, so as to use each of the suspendable execution functions to respectively target a creation request in the kilim queue, and create a virtual network element corresponding to each creation request; The creation request is represented by a directed graph, in which nodes are used to represent the creation subtasks of the virtual network element to be created, and direction information between the nodes is used to represent the dependency relationship between the creation subtasks.

2. The method according to claim 1, characterized in that The parallel calling of at least one kilim-based suspendable execution function, so as to use each of the suspendable execution functions to respectively target a creation request in the kilim queue and create a virtual network element corresponding to each creation request, includes: At least one kilim-based suspendable execution function is called in parallel, so as to utilize each of the suspendable execution functions to execute the creation operations corresponding to the creation subtasks corresponding to each of the nodes in the directed graph in sequence according to the direction information between the nodes in the directed graph corresponding to the creation request corresponding to the kilim queue, and utilize each of the suspendable execution functions to create the virtual network element corresponding to each of the creation requests according to the creation results corresponding to each of the creation subtasks in each of the directed graphs.

3. The method according to claim 2, characterized in that The sequentially executing the creation operation corresponding to the creation subtask corresponding to each node in the directed graph includes: Sending a resource request to a resource server in turn according to the creation subtask corresponding to each node in the directed graph, so that the resource server creates a target resource corresponding to the resource request; each creation subtask corresponds to one resource request; A creation result of the target resource created by the resource server for each resource request is obtained, where the creation result includes the target resource and / or a resource identifier of the target resource.

4. The method according to claim 1, characterized in that: Adding the creation request corresponding to each virtual network element to be created to the preset kilim queue respectively includes: The kilim-based queue processing function is called so that the creation request corresponding to each virtual network element to be created is added to the preset kilim queue.

5. A virtual network element processing device, characterized in that: The device comprises: A request obtaining unit, configured to obtain an instantiation request, wherein the instantiation request at least includes template information, and the template information is template information of at least one virtual network element to be created; A demand obtaining unit, configured to obtain creation resource information according to the template information, wherein the creation resource information at least includes resource demand information corresponding to each virtual network element to be created; A request generating unit, configured to generate a creation request corresponding to each virtual network element to be created according to the resource requirement information; A queue processing unit, used for adding the creation request corresponding to each virtual network element to be created to a preset kilim queue; A network element creation unit, configured to create, for each creation request in the kilim queue, a virtual network element corresponding to each creation request in parallel by using a kilim-based suspendable execution function; The creation request is represented by a directed graph, in which nodes are used to represent the creation subtasks of the virtual network element to be created, and direction information between the nodes is used to represent the dependency relationship between the creation subtasks; Wherein, the network element creation unit includes: A function calling module, used for calling at least one kilim-based suspendable execution function in parallel; An operation execution module, used to use each of the suspendable execution functions to sequentially execute the creation operation corresponding to the creation subtask corresponding to each of the nodes in the directed graph according to the direction information between the nodes in the directed graph corresponding to the creation request corresponding to the kilim queue; The network element creation module is used to create a virtual network element corresponding to each creation request according to the creation result corresponding to each creation subtask in each directed graph by using each of the suspendable execution functions.

6. The device according to claim 5, characterized in that The operation execution module is specifically used to: respectively use each of the suspendable execution functions in turn according to the creation subtask corresponding to each of the nodes in the directed graph corresponding to the suspendable execution function, and send a resource request to the resource server, so that the resource server creates the target resource corresponding to the resource request; Each of the creation subtasks corresponds to one of the resource requests; A creation result of the target resource created by the resource server for each resource request is obtained, where the creation result includes the target resource and / or a resource identifier of the target resource.

7. An electronic device, characterized in that: The electronic device comprises: A memory, used to store applications and data generated by the operation of the applications; A processor, configured to execute the application program to implement: obtaining an instantiation request, wherein the instantiation request at least includes template information, wherein the template information is template information of at least one virtual network element to be created; obtaining creation resource information according to the template information, wherein the creation resource information at least includes resource requirement information corresponding to each virtual network element to be created; generating a creation request corresponding to each virtual network element to be created according to the resource requirement information; adding the creation request corresponding to each virtual network element to be created to a preset kilim queue respectively; for each creation request in the kilim queue, creating the virtual network element corresponding to each creation request in parallel by using a kilim-based suspendable execution function; Wherein, for each of the creation requests in the kilim queue, using a kilim-based suspendable execution function to create in parallel a virtual network element corresponding to each of the creation requests, including: Calling at least one kilim-based suspendable execution function in parallel, so as to use each of the suspendable execution functions to respectively target a creation request in the kilim queue, and create a virtual network element corresponding to each creation request; The creation request is represented by a directed graph, in which nodes are used to represent the creation subtasks of the virtual network element to be created, and direction information between the nodes is used to represent the dependency relationship between the creation subtasks.

Citation Information

Patent Citations

  • Method, device and system for creating virtual machine

    CN106020937A