A method and apparatus for implementing a service function, an electronic device, and a medium
By encapsulating NFV service types into independent service interfaces, the problems of high management difficulty and hot update difficulty of NFV are solved, realizing the scalability and reusability of NFV services and supporting independent driver updates.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SANGFOR TECH INC
- Filing Date
- 2022-04-15
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, NFV management is difficult, especially the deep coupling method, which leads to poor reusability and scalability, and makes it difficult to achieve hot updates.
Each type of NFV service is pre-encapsulated as a service interface. The target service interface is called according to the service request, and the corresponding driver process is used to implement the service function. Independent updates and hot updates of the driver are supported.
It reduces the coupling between NFV services, improves scalability and reusability, enables hot updates of drivers, and reduces the difficulty of NFV selection and integration.
Smart Images

Figure CN114780205B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of virtualization management technology, and in particular to a method, apparatus, electronic device, and computer-readable storage medium for implementing business functions. Background Technology
[0002] Network Functions Virtualization (NFV) is a concept for network architecture. It uses virtualization technology to divide the functions of network nodes into several functional blocks, which are implemented in software and are no longer limited to hardware architecture.
[0003] Network function virtualization relies on NFV drivers for implementation. Currently, NFV driver deployment mainly includes two methods: Virtualized Network Function Descriptor (VNFD) and deep coupling. The VNFD method requires all NFV vendors to design NFV according to the VNFD standard, which is difficult to implement unless the platform is in a particularly dominant position. Due to the poor implementation of VNFD, the deep coupling method is currently more commonly used.
[0004] However, the deep coupling method requires separate interfaces for each NFV, resulting in poor reusability and scalability. If an NFV interface changes, it needs to be re-interfaced. Furthermore, the driver code corresponding to all NFV functions is coupled together in the deep coupling method, making hot updates difficult. This makes managing NFVs based on the deep coupling method quite challenging.
[0005] It is evident that reducing the difficulty of NFV management is a problem that needs to be solved by those skilled in the art. Summary of the Invention
[0006] The purpose of this application is to provide a method, apparatus, electronic device, and computer-readable storage medium for implementing business functions, which can reduce the difficulty of NFV management.
[0007] To address the aforementioned technical problems, embodiments of this application provide a method for implementing a business function, including:
[0008] Based on the types of services included in the NFV service, each type of NFV service is pre-encapsulated into a service interface;
[0009] Upon receiving a business request, the target business interface matching the business request is invoked;
[0010] The target business function corresponding to the target business interface is implemented using the driver process corresponding to the business request.
[0011] Optionally, the business interface includes at least one driver interface based on business process partitioning;
[0012] The step of invoking the target business interface matching the business request upon receiving a business request includes:
[0013] Upon receiving a business request, the business request is proxied to the driver service;
[0014] The target driver interface corresponding to the business request is obtained using the driver service.
[0015] Optionally, before implementing the target business function corresponding to the business request using the driver process corresponding to the target business interface, the method further includes:
[0016] Obtain the driver version corresponding to each type of NFV service;
[0017] Record the corresponding driver interfaces for each type of NFV service under different driver versions.
[0018] Optionally, the step of utilizing the driver process corresponding to the target service interface to implement the target service function corresponding to the service request includes:
[0019] Based on the configured version acquisition interface, determine the target driver version currently corresponding to the target business interface;
[0020] Query the target driver interface corresponding to the target service interface under the target driver version;
[0021] The target business function corresponding to the business request is completed based on the target driver interface.
[0022] Optionally, after pre-encapsulating each type of NFV service into a service interface based on the service categories included in the NFV service, the method further includes:
[0023] Upon receiving an NFV driver update instruction, the update file corresponding to the NFV driver update instruction is imported into the driver service.
[0024] The driver service is used to replace the corresponding driver process with the updated file.
[0025] Optionally, after pre-encapsulating each type of NFV service into a service interface based on the service categories included in the NFV service, the following is included:
[0026] Upon receiving an NFV driver add instruction, the driver file corresponding to the NFV driver add instruction is imported into the driver service.
[0027] The driver file is recorded into the storage space used to store the driver process;
[0028] Add the business interface corresponding to the driver file to the driver service.
[0029] Optionally, the invocation of the target business interface matching the business request includes:
[0030] If the driver process of the target business interface is stored on the server side, the target business interface that matches the business request is invoked.
[0031] If the driver process for the target business interface is not stored on the server, the driver for the target business interface is installed on the server based on the driver plugin fed back by the front-end device; and the target business interface matching the business request is invoked.
[0032] This application also provides a device for implementing business functions, including an encapsulation unit, a calling unit, and an implementation unit;
[0033] The encapsulation unit is used to pre-encapsulate each type of NFV service into a service interface based on the types of services included in the NFV service;
[0034] The invocation unit is used to invoke the target business interface that matches the business request when a business request is received.
[0035] The implementation unit is used to implement the target business function corresponding to the business request by utilizing the driver process corresponding to the target business interface.
[0036] Optionally, the business interface includes at least one driver interface based on business process partitioning;
[0037] The invocation unit includes a proxy subunit and an retrieval subunit;
[0038] The proxy subunit is used to proxy the business request to the driver service when a business request is received.
[0039] The acquisition subunit is used to acquire the target driver interface corresponding to the business request using the driver service.
[0040] Optionally, it may also include an acquisition unit and a recording unit;
[0041] The acquisition unit is used to acquire the driver version corresponding to each type of NFV service;
[0042] The recording unit is used to record the corresponding driver interface for each type of NFV service under different driver versions.
[0043] Optionally, the implementation unit includes a determination subunit, a query subunit, and a completion subunit;
[0044] The determining subunit is used to determine the target driver version currently corresponding to the target business interface based on the set version acquisition interface;
[0045] The query subunit is used to query the target driver interface corresponding to the target business interface under the target driver version;
[0046] The completion subunit is used to complete the target business function corresponding to the business request based on the target driver interface.
[0047] Optionally, it also includes import units and replacement units;
[0048] The import unit is used to import the update file corresponding to the NFV driver update instruction into the driver service when an NFV driver update instruction is obtained.
[0049] The replacement unit is used to replace the corresponding driver process with the updated file using the driver service.
[0050] Optionally, it may also include an import unit, a record unit, and an add unit;
[0051] The import unit is used to import the driver file corresponding to the NFV driver add instruction into the driver service when an NFV driver add instruction is obtained.
[0052] The recording unit is used to record the driver file to a storage space used for storing driver processes;
[0053] The adding unit is used to add the business interface corresponding to the driver file in the driver service.
[0054] Optionally, the calling unit is used to call the target business interface matching the business request when the driver process of the target business interface is stored on the server; and to install the driver of the target business interface on the server according to the driver plugin fed back by the front-end device when the driver process of the target business interface is not stored on the server; and to call the target business interface matching the business request.
[0055] This application also provides an electronic device, including:
[0056] Memory, used to store computer programs;
[0057] A processor is used to execute the computer program to implement the steps of the business function as described above.
[0058] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described business function implementation method.
[0059] As can be seen from the above technical solution, pre-encapsulating each type of NFV service into a service interface based on the service types included in the NFV service, and independently encapsulating different types of NFV services according to service type, can reduce the coupling between NFV services. Upon receiving a service request, the target service interface matching the service request is invoked; using the driver process corresponding to the target service interface, the target service function corresponding to the service request can be implemented. Each service request can be matched with one or more service interfaces; the required service function can be implemented by invoking a single service interface or a combination of multiple service interfaces. In this technical solution, encapsulating each type of NFV into an independent service interface based on service type, and combining these service interfaces, different service requests can be satisfied, improving the scalability and reusability of NFV services. Furthermore, the driver corresponding to each type of NFV service can be updated independently without affecting the normal operation of other drivers, achieving hot driver updates and reducing the difficulty of NFV selection and integration. Attached Figure Description
[0060] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0061] Figure 1 This application provides a schematic diagram of a scenario for implementing business functions.
[0062] Figure 2 A flowchart illustrating a method for implementing a business function as provided in an embodiment of this application;
[0063] Figure 3 A schematic diagram of a device for implementing a business function provided in an embodiment of this application;
[0064] Figure 4 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0065] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0066] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may include steps or units not listed.
[0067] NFV utilizes general-purpose hardware such as x86 and virtualization technology to support software processing for many functions, thereby reducing the cost of expensive network equipment. The implementation of NFV functions relies on NFV drivers. Currently, NFV drivers are often implemented using a deeply coupled approach. The code in this deeply coupled approach is relatively fixed. When adjustments are needed to a particular NFV function, due to code coupling, restarting the code will affect the normal operation of other NFV functions, making hot updates difficult. Furthermore, different NFV functions often share some common services, such as upgrade services and single sign-on services. Currently, the deeply coupled approach sets up separate drivers for different NFV functions, often neglecting the universality of some common services, resulting in poor driver reusability and scalability.
[0068] Therefore, embodiments of this application provide a method, apparatus, electronic device, and computer-readable storage medium for implementing business functions. Based on the types of services included in NFV services, each type of NFV service is pre-encapsulated into a business interface. Upon receiving a business request, the target business interface matching the business request is invoked; using the driver process corresponding to the target business interface, the target business function corresponding to the business request can be implemented.
[0069] Figure 1 This is a schematic diagram illustrating a scenario for implementing business functions, provided in an embodiment of this application. Figure 1 Taking the interaction between the client and the server as an example, the client can be seen as a front-end device through which users send requests to the server. To improve the scalability and reusability of NFV services and achieve hot updates of drivers, the NFV driver can be decoupled in this application. In specific implementation, each type of NFV service can be pre-encapsulated into a service interface based on the types of services included in the NFV service, and each service interface can be stored on the server. Figure 1The example uses N business interfaces. The value of N can be determined based on the actual number of business interfaces, and is not limited here.
[0070] Upon receiving a business request, the server can invoke the target business interface matching the request. Using the driver process corresponding to the target business interface, the target business function corresponding to the request can be implemented. Each business request can be matched with one or more business interfaces; the required business function can be achieved by invoking a single business interface or a combination of multiple business interfaces. In this application, each type of NFV is encapsulated as an independent business interface. Different business requests can be satisfied through the combination of these business interfaces, improving the scalability and reusability of NFV services. Furthermore, the driver corresponding to each type of NFV service can be updated independently without affecting the normal operation of other drivers, achieving hot driver updates and reducing the difficulty of NFV selection and integration.
[0071] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0072] Next, a method for implementing a business function provided by an embodiment of this application will be described in detail. Figure 2 A flowchart illustrating a method for implementing a business function provided in this application embodiment, the method comprising:
[0073] S201: Based on the types of services included in the NFV service, pre-encapsulate each type of NFV service into a service interface.
[0074] In this embodiment of the application, in order to reduce the coupling of the NFV driver process, each type of NFV service can be encapsulated into a service interface according to the service type.
[0075] The business interface can include a driver process.
[0076] There can be many types of services, such as upgrade services, single sign-on services, network configuration services, system management services, and authorization services.
[0077] It should be noted that after the business interface is stored on the server side according to the operation of S201, it is not necessary to repeat the operation of S201 when a business request is received subsequently.
[0078] S202: Upon receiving a business request, invoke the target business interface that matches the business request.
[0079] Users can send business requests to the server through the front-end device. The business request can carry the identifier of the business function to be implemented, so that the server can determine the business interface that matches the business request.
[0080] There are often many business interfaces. To facilitate differentiation, the business interface that matches the business request can be called the target business interface. There can be one or more target business interfaces, and the number of target business interfaces is determined by the business functions that need to be implemented in the business request.
[0081] Considering that the business process corresponding to each business interface often contains many steps, and that the business processes corresponding to the same business interface under different driver versions often have many identical steps, or that business processes between similar businesses may also have some identical steps, this embodiment of the application can divide the different operation steps in the business process into different driver interfaces according to the business process corresponding to each business interface. In this case, each business interface may include at least one driver interface based on the business process division.
[0082] In the actual implementation, when the server receives a business request, it can proxy the business request to the driver service; and use the driver service to obtain the target driver interface corresponding to the business request.
[0083] In this embodiment of the application, each business interface includes at least one driver interface. For ease of distinction, the driver interface corresponding to the business request can be referred to as the target driver interface.
[0084] The server-side functionality can consist of two parts: a web service and a driver service. The web service interacts with the front-end device, for example, receiving business requests from the front-end device or sending response information back to it. The driver service starts the driver process to implement the required business functionality, i.e., NFV functionality.
[0085] Given that NFV driver processes support plug-in imports, the server can determine whether it has stored the driver process for the target business interface when it receives a business request. The driver process is the foundation for implementing business functions.
[0086] If the driver process for the target business interface is stored on the server side, the target business interface that matches the business request can be called directly.
[0087] If the server does not store the driver process for the target business interface, it indicates that the server cannot implement the NFV function corresponding to the target business interface. In this case, the server can send a message to the front-end device indicating that the driver is missing, so that the user can submit a request for a driver plugin to the server through the front-end device. Based on the driver plugin submitted by the front-end device, the server can install the driver for the target business interface on the server. After the driver is installed, it will be automatically loaded.
[0088] S203: Utilize the driver process corresponding to the target business interface to implement the target business function corresponding to the business request.
[0089] The target business interface contains a corresponding driver process. Starting the driver process will enable the corresponding function.
[0090] As can be seen from the above technical solution, pre-encapsulating each type of NFV service into a service interface based on the service types included in the NFV service, and independently encapsulating different types of NFV services according to service type, can reduce the coupling between NFV services. Upon receiving a service request, the target service interface matching the service request is invoked; using the driver process corresponding to the target service interface, the target service function corresponding to the service request can be implemented. Each service request can be matched with one or more service interfaces; the required service function can be implemented by invoking a single service interface or a combination of multiple service interfaces. In this technical solution, encapsulating each type of NFV into an independent service interface based on service type, and combining these service interfaces, different service requests can be satisfied, improving the scalability and reusability of NFV services. Furthermore, the driver corresponding to each type of NFV service can be updated independently without affecting the normal operation of other drivers, achieving hot driver updates and reducing the difficulty of NFV selection and integration.
[0091] In practical applications, the driver process of a business interface may have different versions. The operation steps or the order of operation steps performed by different versions of the driver process may differ. Therefore, the driver interface to be called for the same business interface may differ under different versions.
[0092] In this embodiment, the server can obtain the driver version corresponding to each type of NFV service; and record the driver interface corresponding to each type of NFV service under different driver versions.
[0093] In practice, when the server uses the driver process corresponding to the target business interface to implement the target business function corresponding to the business request, it can obtain the interface based on the set version and determine the target driver version currently corresponding to the target business interface.
[0094] Different driver versions correspond to different driver interfaces. To make it easier to distinguish them, the driver interface corresponding to the target driver version can be called the target driver interface.
[0095] After determining the target driver version, the server can query the target driver interface corresponding to the target business interface under the target driver version; and complete the target business function corresponding to the business request based on the target driver interface.
[0096] In this embodiment, a version retrieval interface for accessible NFV can be specified on the server side. This interface requires no authentication and can obtain the NFV version number. The version number can originate from either the mainline version or a custom version; no limitation is made here. After obtaining the version number, the server can forward business requests to the corresponding target driver interface, using the target driver interface to implement the target business function.
[0097] Considering the differences in implementation processes of the same business interface across different versions, setting up different correspondences between versions and driver interfaces can better suit different versions of the business, enabling the server to more accurately provide the business functions required by the business request.
[0098] In this embodiment, decoupling between different NFV services is achieved by encapsulating each type of NFV service into an independent service interface. Therefore, when an NFV service needs to be updated, only the driver process corresponding to the NFV service to be updated needs to be updated; when a new type of NFV service needs to be added, only the driver process corresponding to the new type of NFV service needs to be maintained on the server side, and restarting the driver process will not affect the driver processes of other NFV services.
[0099] Taking NFV service updates as an example, in the specific implementation, when an NFV driver update instruction is obtained, the update file corresponding to the NFV driver update instruction can be imported into the driver service; the driver service can then be used to replace the corresponding driver process with the update file.
[0100] A driver process can contain the driver's business code, related configurations, and database configurations. Different NFV driver processes have isolated paths, so updating one NFV business driver process will not affect other driver processes.
[0101] Taking adding an NFV service as an example, in the specific implementation, upon receiving the NFV driver addition instruction, the driver file corresponding to the NFV driver addition instruction can be imported into the driver service. Since it is a newly added NFV driver, there is no record of this NFV driver in the driver service. In order to facilitate subsequent calls to this NFV driver, the driver file needs to be recorded in the storage space used to store the driver process; and the business interface corresponding to the driver file needs to be added in the driver service.
[0102] After replacing or adding a driver process, the driver process needs to be restarted for the changes to take effect. Since only the NFV driver process that was replaced or added is restarted, only the business functions of that driver process will be suspended. Other NFV services can still provide business interfaces and call the NFV driver to provide business functions.
[0103] In practical applications, to prevent users from unknowingly calling updated or newly added driver processes through the front-end device, which could cause the server to be unable to provide normal business functions, the server can send a "Driver service is updating, please try again later" message to the front-end device. By displaying this message, the front-end device can help users understand the reason for the failure of the current business function.
[0104] In this embodiment, all NFV service update or addition operations are hidden in the server background, and the behavior of upgrading the driver process will not cause other service functions to become unavailable, thus effectively solving the problem of driver hot update.
[0105] Figure 3 A schematic diagram of a business function implementation device provided in an embodiment of this application includes an encapsulation unit 31, a calling unit 32, and an implementation unit 33;
[0106] Encapsulation unit 31 is used to encapsulate each type of NFV service into a service interface in advance based on the types of services included in the NFV service;
[0107] Calling unit 32 is used to call the target business interface that matches the business request when a business request is received;
[0108] The implementation unit 33 is used to implement the target business function corresponding to the business request by utilizing the driver process corresponding to the target business interface.
[0109] Optionally, the business interface includes at least one driver interface based on the business process partitioning;
[0110] The invocation unit includes a proxy sub-unit and an retrieval sub-unit;
[0111] The proxy subunit is used to proxy business requests to the driver service when a business request is received.
[0112] The acquisition sub-unit is used to obtain the target driver interface corresponding to the business request using the driver service.
[0113] Optionally, it may also include an acquisition unit and a recording unit;
[0114] The acquisition unit is used to acquire the driver version corresponding to each type of NFV service;
[0115] The recording unit is used to record the corresponding driver interface for each type of NFV service under different driver versions.
[0116] Optionally, the implementation unit includes a determination subunit, a query subunit, and a completion subunit;
[0117] The determination subunit is used to determine the target driver version corresponding to the target business interface based on the set version acquisition interface;
[0118] The query sub-unit is used to query the target driver interface corresponding to the target business interface under the target driver version.
[0119] The completion subunit is used to complete the target business function corresponding to the business request based on the target driver interface.
[0120] Optionally, it also includes import units and replacement units;
[0121] The import unit is used to import the update file corresponding to the NFV driver update instruction into the driver service when the NFV driver update instruction is obtained.
[0122] The replacement unit is used to replace the corresponding driver process with the update file using the driver service.
[0123] Optionally, it may also include an import unit, a record unit, and an add unit;
[0124] The import unit is used to import the driver file corresponding to the NFV driver add instruction into the driver service when the NFV driver add instruction is obtained.
[0125] A recording unit is used to record driver files to a storage space used to store driver processes.
[0126] The Add Unit is used to add the business interface corresponding to the driver file in the driver service.
[0127] Optionally, the calling unit is used to call the target business interface that matches the business request when the driver process of the target business interface is stored on the server side; and to install the driver of the target business interface on the server side based on the driver plugin fed back by the front-end device when the driver process of the target business interface is not stored on the server side; and to call the target business interface that matches the business request.
[0128] Figure 3 The description of the features in the corresponding embodiments can be found in [reference needed]. Figure 2 The relevant descriptions of the corresponding embodiments will not be repeated here.
[0129] As can be seen from the above technical solution, pre-encapsulating each type of NFV service into a service interface based on the service types included in the NFV service, and independently encapsulating different types of NFV services according to service type, can reduce the coupling between NFV services. Upon receiving a service request, the target service interface matching the service request is invoked; using the driver process corresponding to the target service interface, the target service function corresponding to the service request can be implemented. Each service request can be matched with one or more service interfaces; the required service function can be implemented by invoking a single service interface or a combination of multiple service interfaces. In this technical solution, encapsulating each type of NFV into an independent service interface based on service type, and combining these service interfaces, different service requests can be satisfied, improving the scalability and reusability of NFV services. Furthermore, the driver corresponding to each type of NFV service can be updated independently without affecting the normal operation of other drivers, achieving hot driver updates and reducing the difficulty of NFV selection and integration.
[0130] Figure 4 A structural diagram of an electronic device provided in an embodiment of this application, such as... Figure 4 As shown, the electronic device includes: a memory 20 for storing computer programs;
[0131] The processor 21 is used to execute computer programs to implement the steps of the business function implementation method as described in the above embodiments.
[0132] The electronic devices provided in this embodiment may include, but are not limited to, smartphones, tablets, laptops, or desktop computers.
[0133] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0134] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 20 is used to store at least the following computer program 201, which, after being loaded and executed by the processor 21, is capable of implementing the relevant steps of the business function implementation method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, and the storage method may be temporary storage or permanent storage. The operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, business interfaces containing driver processes.
[0135] In some embodiments, the electronic device may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
[0136] Those skilled in the art will understand that Figure 4 The structures shown do not constitute a limitation on electronic devices and may include more or fewer components than those shown.
[0137] It is understood that if the implementation method of the business functions in the above embodiments is implemented in the form of software functional units and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes: USB flash drive, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, magnetic disk or optical disk, and other media capable of storing program code.
[0138] Based on this, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of the above-described business function implementation method.
[0139] The functions of each functional module of the computer-readable storage medium described in the embodiments of the present invention can be specifically implemented according to the methods in the above method embodiments. The specific implementation process can be referred to the relevant descriptions in the above method embodiments, which will not be repeated here.
[0140] The foregoing has provided a detailed description of a method, apparatus, electronic device, and computer-readable storage medium for implementing a business function according to embodiments of this application. The various embodiments are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0141] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0142] The foregoing has provided a detailed description of a method, apparatus, electronic device, and computer-readable storage medium for implementing a business function provided in this application. Specific examples have been used to illustrate the principles and implementation methods of the invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of the invention. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from the principles of the invention, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A method for implementing a business function, characterized in that, include: Based on the types of services included in the NFV service, each type of NFV service is pre-encapsulated into a service interface; Upon receiving a business request, the target business interface matching the business request is invoked; Obtain the driver version corresponding to each type of NFV service; Record the corresponding driver interfaces for each type of NFV service under different driver versions; The target business function corresponding to the target business interface is implemented using the driver process corresponding to the target business interface. The step of implementing the target business function corresponding to the business request using the driver process corresponding to the target business interface includes: According to the business process corresponding to each business interface, the different operation steps in the business process are divided into different driver interfaces; based on the set version acquisition interface, the target driver version corresponding to the target business interface is determined; the driver interface corresponding to the target driver version is called the target driver interface; the target business function corresponding to the business request is completed according to the target driver interface; All NFV service updates or additions are hidden in the server backend.
2. The method for implementing the business function according to claim 1, characterized in that, The business interface includes at least one driver interface based on business process partitioning; The step of invoking the target business interface matching the business request upon receiving a business request includes: Upon receiving a business request, the business request is proxied to the driver service; The target driver interface corresponding to the business request is obtained using the driver service.
3. The method for implementing the business function according to claim 1, characterized in that, After pre-defines each type of NFV service as a service interface based on the service categories included in the NFV service, the following is also included: Upon receiving an NFV driver update instruction, the update file corresponding to the NFV driver update instruction is imported into the driver service. The driver service is used to replace the corresponding driver process with the updated file.
4. The method for implementing the business function according to claim 1, characterized in that, After pre-defines each type of NFV service as a service interface based on the service categories included in the NFV service, the following is included: Upon receiving an NFV driver add instruction, the driver file corresponding to the NFV driver add instruction is imported into the driver service. The driver file is recorded into the storage space used to store the driver process; Add the business interface corresponding to the driver file to the driver service.
5. The method for implementing the business function according to any one of claims 1 to 4, characterized in that, The invocation of the target business interface matching the business request includes: If the driver process of the target business interface is stored on the server side, the target business interface that matches the business request is invoked. If the driver process for the target business interface is not stored on the server, the driver for the target business interface is installed on the server based on the driver plugin fed back by the front-end device; and the target business interface matching the business request is invoked.
6. A device for implementing a business function, characterized in that, It includes encapsulation units, calling units, and implementation units; The encapsulation unit is used to pre-encapsulate each type of NFV service into a service interface based on the types of services included in the NFV service; The invocation unit is used to invoke the target business interface that matches the business request when a business request is received. The implementation unit is used to divide different operation steps in the business process into different driver interfaces according to the business process corresponding to each business interface; determine the target driver version corresponding to the target business interface based on the set version acquisition interface; and refer to the driver interface corresponding to the target driver version as the target driver interface. Complete the target business function corresponding to the business request based on the target-driven interface; All NFV service update or addition operations are hidden in the server backend; It also includes an acquisition unit and a recording unit; The acquisition unit is used to acquire the driver version corresponding to each type of NFV service; The recording unit is used to record the corresponding driver interface for each type of NFV service under different driver versions.
7. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the method for implementing the business function as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for implementing the business function as described in any one of claims 1 to 5.