A method of providing service data and related apparatus

By predefining service templates and restoration strategies in the SDN controller, the problem of low efficiency in querying and transforming service data across vendor devices is solved, enabling fast and low-cost acquisition and transformation of service data, and supporting user-defined strategies to meet customized needs.

CN117956017BActive Publication Date: 2025-12-16RUIJIE NETWORKS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211280804.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-19
Publication Date
2025-12-16
Estimated Expiration
2042-10-19

AI Technical Summary

Technical Problem

In software-defined networking, existing technologies suffer from problems such as slow deployment of new services, high costs, difficulty in linking multiple vendors' devices, and low efficiency in business data conversion. In particular, the low efficiency of business data query and conversion between devices from different vendors leads to high development and maintenance costs.

Method used

By using predefined service templates and restoration strategies, the SDN controller obtains the configuration data of the target device and converts it into service data, enabling unified management of devices across vendors and supporting user-defined restoration strategies to meet customized needs.

Benefits of technology

It improved the efficiency of acquiring business data, reduced development and maintenance costs, and enabled unified management and rapid business data conversion across vendor devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117956017B_ABST
    Figure CN117956017B_ABST
Patent Text Reader

Abstract

The application discloses a method for providing service data and a related device, and relates to the technical field of communication. In the application, an SDN controller inquires a target service template corresponding to a service based on a preset service template set, then acquires target configuration data of a target device through an acquisition path saved in the target service template, inquires a target restoration strategy corresponding to the service based on a preset restoration strategy set, then converts the target configuration data into target service data, and finally returns the target service data to a service requester. In this way, the SDN controller defines the service template set in advance, so that the SDN controller of a single manufacturer can be connected to devices of different manufacturers, the acquisition efficiency of the configuration data is improved, and in addition, a general data conversion method is provided for users in the SDN controller, so that the configuration data is quickly converted into the service data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of communication technology, in particular to a method for providing service data and related apparatus. BACKGROUND

[0002] Software Defined Network (SDN) as a new network revolution concept, compared with the traditional network, the scale, function, control and flexibility have greatly improved. SDN controller can completely replace the deployment model of traditional network, through Openflow, Network Configuration (NETCONF) and other southbound interface protocols to realize the unified management of all network devices, so as to realize fast deployment, resource integration, unified planning and on-demand calling.

[0003] The SDN controller based on Model-Driven Service Abstraction Layer (MD-SAL) architecture reads the configuration data of the device through the NETCONF channel, and converts the device configuration data into visual service data to display to the user. As a standard southbound protocol, NETCONF abstracts the network element device model and the interaction interface through YANG (Yet Another Next Generation, YANG) modeling language. In the multi-vendor user scenario, the YANG model definitions of different vendor devices are different. If you want to read the device network element model of different vendors, you need to introduce multiple controllers, which mainly have the following three problems:

[0004] 1) Slow new service online, high cost.

[0005] Business and vendor coupling, business requirements depend on device manufacturer development, function test, system integration depends on device manufacturer, depends on all vendor version development, integration, resulting in slow online of new business of user; users need to interface with different vendor teams at the same time, the communication cost is high, and the maintenance cost will also increase.

[0006] 2) Multi-vendor device linkage is difficult.

[0007] The controller does not have multi-vendor interworking capability, resulting in limitations in business design for users, network design is bound to the vendor, and the network openness is poor. At the same time, different vendors' controllers have different processing methods for data consistency, device alarms and other key services, resulting in the need for users to interface with multiple implementations, increasing the workload.

[0008] 3) Low conversion efficiency of service data.

[0009] When the service involves devices of different manufacturers, the service data query needs to request cooperation across controllers and across modules, and due to the differences in configuration structures of devices of different manufacturers, unified data conversion and data integration are needed, resulting in low efficiency of configuration data conversion to service data.

[0010] To solve the above three problems, the current main solutions are as follows:

[0011] Method 1: Manually adapting YANG models of other manufacturers.

[0012] Developers manually convert YANG files of other manufacturers through the controller NETCONF channel, first converting the YANG files into YANG structures supported by the controller, and then writing scripts to adapt and develop the YANG files, thereby realizing the conversion of YANG models of other manufacturers to service models, and further providing service data required for executing services.

[0013] When method 1 is used, since all models of devices of major manufacturers need to be adapted, i.e., different manufacturers' devices need to be written with different adaptation codes, the adaptation workload is large, which results in a huge amount of codes, high development and maintenance costs; at the same time, for new services online, developers need to modify the adaptation codes so that the controller re-adapts all devices, thereby making the efficiency of converting device configuration data to service data low, resulting in a long period of new service online.

[0014] Method 2: Introducing NETCONF capabilities of other manufacturers as plugins of the controller.

[0015] By integrating the NETCONF core capabilities of other manufacturers as plugins, the plugins are installed on a single controller, so that a single controller can adapt devices of multiple manufacturers.

[0016] When method 2 is used, the plugin solution cannot get rid of manufacturer dependence, and the controller needs to interface with the NETCONF modules of other manufacturers, resulting in a dramatic increase in development and communication costs; at the same time, problem positioning and plugin maintenance also need to rely on other manufacturers, resulting in slow problem response.

[0017] Therefore, a new method for providing service data is needed to improve the efficiency of obtaining service data. SUMMARY

[0018] The present application provides a method for providing service data and related apparatus to improve the efficiency of obtaining service data.

[0019] In a first aspect, the embodiments of the present application provide a method for providing service data, the method comprising:

[0020] receive a service data query request sent by a service requester, the service data query request carrying target description information of a target device and target type identification of a target service;

[0021] obtain a target service template and a target restoration strategy based on the target description information and the target type identification from a preset service template set and a preset restoration strategy set, wherein each service template is associated with description information of a device and type identification of a service, each restoration strategy is associated with description information of a device and type identification of a service, and each service template stores a path for obtaining configuration data of a corresponding service in a corresponding device, and each restoration strategy is used to convert the configuration data of the corresponding service into service data required for executing the service;

[0022] obtain target configuration data of the target service in the target device based on the target obtaining path recorded in the target service template, and convert the target configuration data into corresponding target service data based on the target restoration strategy;

[0023] return the target service data to the service requester.

[0024] In a second aspect, an apparatus for providing service data is provided, and the apparatus comprises:

[0025] a receiving module configured to receive a service data query request sent by a service requester, the service data query request carrying target description information of a target device and target type identification of a target service;

[0026] a matching module configured to obtain a target service template and a target restoration strategy based on the target description information and the target type identification from a preset service template set and a preset restoration strategy set, wherein each service template is associated with description information of a device and type identification of a service, each restoration strategy is associated with description information of a device and type identification of a service, and each service template stores a path for obtaining configuration data of a corresponding service in a corresponding device, and each restoration strategy is used to convert the configuration data of the corresponding service into service data required for executing the service;

[0027] an obtaining module configured to obtain target configuration data of the target service in the target device based on the target obtaining path recorded in the target service template, and convert the target configuration data into corresponding target service data based on the target restoration strategy;

[0028] a returning module configured to return the target service data to the service requester.

[0029] Optionally, before receiving the service data query request sent by the service requester, the receiving module is further configured to:

[0030] The corresponding service template is generated for each service, and a service template set is generated based on the obtained service templates, wherein each service template is generated in the following manner:

[0031] In response to the first configuration operation, a device associated with a service is determined, and each configuration data for implementing a service is set on the device;

[0032] Based on the type of the service, the acquisition path corresponding to each configuration data and the dependency relationship between each configuration data are obtained; the dependency relationship represents the acquisition order between each configuration data;

[0033] Based on the dependency relationship between each configuration data, the acquisition path corresponding to each configuration data is stored in sequence to form a path list;

[0034] Based on the path list, the description information of the device, and the type identifier of the service, the corresponding service template is generated.

[0035] Optionally, each restoration strategy is used to convert configuration data into service data based on an actual service scenario, and each restoration strategy is a preconfigured restoration strategy or a custom restoration strategy; wherein each custom restoration strategy is divided into a plurality of custom strategy sets, and each custom strategy set is associated with the description information of a device and the type identifier of a service;

[0036] Then, based on the target description information and the target type identifier, the corresponding target restoration strategy is obtained from the preconfigured restoration strategy set, and the matching module is specifically configured to:

[0037] If the preconfigured restoration strategy is matched and obtained based on the target description information and the target type identifier, the preconfigured restoration strategy is used as the target restoration strategy;

[0038] If a custom strategy set is matched and obtained based on the target description information and the target type identifier, a custom restoration strategy is selected from the custom strategy set as the target restoration strategy.

[0039] Optionally, when a custom restoration strategy is selected from the custom strategy set as the target restoration strategy, the matching module performs any one of the following operations:

[0040] A custom restoration strategy is randomly selected from the custom strategy set as the target restoration strategy;

[0041] A custom restoration strategy with a priority that meets a pre-set priority condition is selected from the custom strategy set as the target restoration strategy;

[0042] A custom restoration strategy with a usage frequency that meets a pre-set frequency condition is selected from the custom strategy set as the target restoration strategy.

[0043] Optionally, based on the target acquisition path recorded in the target service template, when acquiring each target configuration data of the target service in the target device, the acquisition module is configured to:

[0044] read each target acquisition path corresponding to each target configuration data in sequence based on the path list recorded in the target service template, wherein, after reading each target acquisition path, the following operations are performed:

[0045] invoke a preset configuration channel to acquire the target configuration data of the target service pointed by the current target acquisition path in the target device; wherein, if the target configuration data of the target service pointed by the current target acquisition path does not exist in the target device, the value of the target configuration data of the target service pointed by the current target acquisition path is set to be empty, and the acquired target configuration data is saved to the configuration cache area;

[0046] acquire each target configuration data of the target service in the configuration cache area.

[0047] Optionally, when converting each target configuration data into corresponding target service data based on the target restoration strategy, the acquisition module is further configured to:

[0048] if there is target configuration data with a value of empty in each target configuration data, delete the target service data converted from the target configuration data with a value of empty.

[0049] Optionally, the target description information of the target device includes any one of the following:

[0050] the manufacturer of the target device;

[0051] the manufacturer and the device model of the target device;

[0052] the manufacturer, the device model and the software version of the target device.

[0053] In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor and a computer program stored in the memory and executable by the processor, and the processor executes the computer program to implement the method of any one of the first aspect.

[0054] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the method of any one of the first aspect.

[0055] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when invoked by a computer, causes the computer to execute the method of the first aspect.

[0056] In the embodiment of the present application, after the SDN controller receives the service data query request sent by the service requester, the target service template corresponding to the service is queried based on the preset service template set, and then the target configuration data of the target device is obtained through the obtaining path saved in the target service template. On the other hand, the target restoration strategy corresponding to the service is queried based on the preset restoration strategy set, and then the target configuration data is converted into target service data, and finally the target service data is returned to the service requester.

[0057] In this way, the SDN controller defines the service template in advance, saves the obtaining path of the configuration data required by the service in the corresponding device, and then obtains the device configuration data, so that the SDN controller of a single manufacturer can be connected to devices of different manufacturers. In this way, the query of the configuration data does not need to be performed across controllers, improving the query efficiency of the configuration data. In addition, a general data conversion method is provided for users in the SDN controller and is saved in the restoration strategy, realizing the fast conversion of the configuration data to the service data. At the same time, the SDN controller supports user-defined restoration strategies, solving the customized needs of users for special services. Moreover, the service template and the restoration strategy can be realized by a small amount of code, reducing the development and maintenance cost of the SDN controller. BRIEF DESCRIPTION OF DRAWINGS

[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor. In the drawings:

[0059] Figure 1 The system architecture in the embodiment of the present application is shown in the figure;

[0060] Figure 2 The detailed flowchart of providing service data under the system architecture in the embodiment of the present application is shown in the figure;

[0061] Figure 3 The detailed flowchart of providing service data under the system architecture in the embodiment of the present application is shown in the figure;

[0062] Figure 4 The step flowchart of providing service data under the specific application scenario in the embodiment of the present application is shown in the figure;

[0063] Figure 5 The logic diagram of providing service data under the specific application scenario in the embodiment of the present application is shown in the figure;

[0064] Figure 6 The structure diagram of a device for providing service data in the embodiment of the present application is shown in the figure;

[0065] Figure 7 Fig. 1 is a structural schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0066] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be described below in a clear and complete manner with reference to the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments described in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the scope of protection of the technical solutions of the present application.

[0067] Some concepts involved in the embodiments of the present application will be introduced below.

[0068] (1) Software Defined Network (SDN) controller: The SDN controller is the core of the entire software defined network and is the bridge connecting the bottom layer switching device and the upper layer application program. On the one hand, the SDN controller can monitor and control the bottom layer forwarding device, and perform link discovery, topology management, flow table distribution and other behaviors through the OpenFlow and other southbound protocols. On the other hand, the controller can provide a standard northbound interface to the upper layer application, and through these interfaces, the upper layer application can effectively schedule and configure the bottom layer network to realize automatic and flexible control of the network.

[0069] (2) Network Configuration Protocol (NETCONF): NETCONF is an XML-based network configuration and management protocol, which uses a simple RPC-based mechanism to realize communication between the client and the server. The client can be a script or an application program running on a network management, and the server is a typical network device. The network management can perform operations such as configuration, modification and deletion of the remote device through the NETCONF protocol.

[0070] (3) YANG model: The YANG model defines the hierarchical structure of data and can be used for NETCONF-based operations, including operation of configuration data and state data, remote procedure call and notification, and can completely describe all data sent between the NETCONF client and the server.

[0071] (4) YANG Nodes: The four main types of data nodes in the YANG model include leaf nodes, list nodes, leaf-list nodes, and container nodes. The YANG model is a tree structure that is a tree describing the entire device, consisting of countless leaves, lists, leaf lists, and containers.

[0072] The preferred embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0073] See Figure 1 As shown in the embodiment of this application, it includes three main parts: a service requester 100, an SDN controller 101, and a target device 102. The service requester 100 sends a service data query request to the SDN controller 101, carrying description information of the target device 102 and a type identifier of the target service in the service data query request. The SDN controller 101 receives the service data query request and, based on the description information of the target device 102 and the type identifier of the target service carried in the request, finds the corresponding target service template and target restoration strategy. The service template stores the acquisition path of the configuration data required by the target service in the target device 102. The SDN controller 101 obtains the target configuration data sequentially through the acquisition path. Finally, the SDN controller 101 converts the target configuration data into the service data required to execute the target service through the target restoration strategy and returns it to the service requester 100.

[0074] Based on the above system architecture, see [link / reference] Figure 2 As shown in the embodiment of this application, the detailed process by which the SDN controller obtains service data from the target device and provides it to the service requester is as follows:

[0075] Step 201: Receive the service data query request sent by the service requester. The service data query request carries the target description information of the target device and the target type identifier of the target service.

[0076] Specifically, in this embodiment of the application, before executing step 201, the relevant developers will generate corresponding business templates for each specified business, and generate a business template set based on the obtained business templates. The generation method of each business template is described in [reference needed]. Figure 3 As shown:

[0077] Step 2011: In response to the first configuration operation, identify a device associated with a service, on which various configuration data for implementing a service are set.

[0078] For example, assuming that the service a is to acquire the routing information of the switch 1 for the data packet m, the device associated with the service a is the switch 1, and the switch 1 is provided with each configuration data for implementing the service a, i.e., the routing information of the switch 1 for forwarding the data packet m, such as the destination, the next hop, and the forwarding interface.

[0079] Optionally, one service can also be associated with multiple target devices, for example, the service a can also be to acquire the routing information of the switch 2, the switch 3, and the switch 4 for the data packet m. In the embodiments of the present application, one service is associated with one target device is taken as an example for description.

[0080] Step 2012: obtaining the acquisition path of each configuration data and the dependency relationship between each configuration data based on the service type of one service.

[0081] Specifically, in the embodiments of the present application, the dependency relationship represents the acquisition order of each configuration data.

[0082] For example, the developer classifies the service a as the routing forwarding type, and the dependency relationship between each configuration data of the switch 1 is: destination→next hop→forwarding interface, i.e., the destination is acquired first, the next hop is acquired second, and the forwarding interface is acquired last.

[0083] Table 1

[0084] Service name Service type Associated target device Configuration data dependency relationship Service a Type a Switch 1 Destination -> Next hop -> Forwarding interface Service b Type b Device 2 Configuration data b1 -> Configuration data b2 Service c Type c Device 3 Configuration data c1, Configuration data c2

[0085] For another example, referring to Table 1, the service type of the service b is type b, the associated target device is device 2, and the dependency relationship between each required configuration data is: configuration data b1→configuration data b2. Specifically, the service type of the service c is type c, the associated target device is device 3, and there is no dependency relationship between each required configuration data of the service c, and the service c can acquire the configuration data c1 and the configuration data c2 through their respective acquisition paths.

[0086] Further, the acquisition path of each configuration data is not complete.

[0087] On one hand, when the acquisition of one configuration data does not depend on other configuration data, the acquisition path thereof needs to be perfected by a service input provided by the service requester when sending the service data query request.

[0088] On the other hand, when the acquisition of one configuration data depends on other configuration data, the acquisition path thereof needs to be perfected by the dependent configuration data.

[0089] For example, the service b acquires the configuration data b1, and the corresponding acquisition path is perfected by the input information of the service b. When the service b acquires the configuration data b1 through the perfected acquisition path, the configuration data b1 is used to perfect the acquisition path of the configuration data b2, and then the configuration data b2 is acquired.

[0090] Specifically, when the acquisition path of the configuration data b2 is perfected, the return value obtained by the acquisition path of the configuration data b1 can be directly filled into the acquisition path of the configuration data b2, or the return value obtained by the acquisition path of the configuration data b1 can be partially filled into the acquisition path of the configuration data b2. The specific perfection manner is determined according to the form of the acquisition path of the configuration data b2 and the return value when the configuration data b1 is acquired, which is not limited here.

[0091] Step 2013: Based on the dependency relationship between the configuration data, the acquisition paths corresponding to the configuration data are sequentially stored to form a path list.

[0092] Specifically, the acquisition path of each configuration data corresponds to an acquisition path name, and the acquisition path corresponding to each configuration data further stores a query identifier and a dependency identifier. The query identifier is the configuration data name corresponding to the acquisition path, and the dependency identifier is the configuration data name on which the acquisition path depends.

[0093] Table 2

[0094]

[0095] For example, referring to Table 2, the acquisition path name of the configuration data b1 required by the service b is path_b1, the query identifier of which is b1, and the acquisition path name of the configuration data b2 is path_b2, the query identifier of which is b2. Since the acquisition of the configuration data b1 does not depend on other configuration data, but depends on the input information of the service b, the dependency identifier in path_b1 is input. The acquisition of the configuration data b2 depends on the configuration data b1, so the dependency identifier in path_b2 is b1. The developer stores path_b1 before path_b2 according to the dependency relationship to form a path list.

[0096] Step 2014: Based on the path list, the description information of a device, and the type identifier of a service, a corresponding service template is generated.

[0097] Specifically, in the embodiment of the present application, the developer saves and defines the path list as a corresponding service template, and saves the service template in association with the description information of the target device corresponding to the service and the service type corresponding to the service, so as to subsequently find the service template. Further, the service template further stores a service data structure, which represents the target structure when the configuration data is restored into service data.

[0098] For example, the developer defines a path list composed of path_b1 and path_b2 as a service template B corresponding to the service b, and saves the service template B in association with the description information of the device b and the service type of the service b.

[0099] Optionally, in an embodiment of the present application, the target description information of the target device includes any one of the following:

[0100] the manufacturer of the target device;

[0101] the manufacturer and the device model of the target device;

[0102] the manufacturer, the device model and the software version of the target device.

[0103] Table 3

[0104]

[0105] For example, referring to Table 3, the device description information is that among a plurality of devices corresponding to manufacturer 1 + device model 1 + software version 1, if the service type is a routing information acquisition, the service template corresponding to the service is service template A, and if the service type is type b, the service template corresponding to the service is service template B; similarly, the device description information is that among one or more devices corresponding to manufacturer 2 + device model 2 + software version 2, if the service type is type c, the service template corresponding to the service is service template C.

[0106] Based on step 2014, by defining the service template, saving the acquisition path of the configuration data required by the service in the corresponding device, and maintaining the service template set composed of each service template by the SDN controller, the SDN controller of a single manufacturer can be connected to devices of different manufacturers, thereby improving the query efficiency of the configuration data.

[0107] Step 202: based on the target description information and the target type identifier, obtaining the corresponding target service template and target restoration strategy in the preset service template set and restoration strategy set.

[0108] Specifically, in an embodiment of the present application, each service template is associated with the description information of a device and the type identifier of a service, each restoration strategy is associated with the description information of a device and the type identifier of a service, each service template saves the acquisition path of each configuration data required by the corresponding service in the corresponding device, each restoration strategy is used to convert each configuration data of the corresponding service into service data required for executing the service, and each restoration strategy is based on the service data structure saved in the service template corresponding to the service as a standard when converting the configuration data into the service data.

[0109] Further, each reduction strategy is used to convert the configuration data into the service data based on the actual service scenario, and each reduction strategy is a preconfigured reduction strategy or a custom reduction strategy; wherein each custom reduction strategy is divided into a plurality of custom strategy sets, and each custom strategy set is associated with description information of one device and type identification of one service.

[0110] For example, a developer designs a preconfigured reduction strategy suitable for most services. In the embodiment of the present application, the preconfigured reduction strategy is a general data conversion method written by the developer, and a template-driven manner is used to replace the redundant configuration adaptation work in the prior art, so that the preconfigured reduction strategy can be adapted to devices of multiple different manufacturers, and automatic conversion of service data to configuration data is realized. In addition, in actual application scenarios, a user can design and register one or more custom reduction strategies for special services. A plurality of custom reduction strategies corresponding to the same type of service constitute a custom strategy set, each custom strategy set is associated with description information of one device and type identification of one service, and the plurality of custom reduction strategies in each custom strategy set are also associated with the same device description information and service type identification.

[0111] Therefore, based on the target description information and the target type identification, the corresponding target reduction strategy is obtained from the preconfigured reduction strategy set, including the following two cases:

[0112] Case one: if the preconfigured reduction strategy is matched based on the target description information and the target type identification, the preconfigured reduction strategy is used as the target reduction strategy.

[0113] Case two: if the custom strategy set is matched based on the target description information and the target type identification, one custom reduction strategy is selected from the custom strategy set as the target reduction strategy.

[0114] Table 4

[0115]

[0116]

[0117] For example, referring to Table 3, for a plurality of devices corresponding to the device description information of: manufacturer 1 + device model 1 + software version 1, if the service type is route information acquisition, the restoration strategy corresponding to the service is the custom strategy set a, wherein the selectable target restoration strategy includes: custom restoration strategy a1 and custom restoration strategy a2; if the service type is type b, the restoration strategy corresponding to the service is the custom strategy set b, wherein the selectable target restoration strategy includes: custom restoration strategy b1 and custom restoration strategy b2; in addition, for one or more devices corresponding to the device description information of: manufacturer 2 + device model 2 + software version 2, if the service type is type c, the target restoration strategy corresponding to the service is the preconfigured restoration strategy.

[0118] Optionally, in the embodiment of the application, when one custom restoration strategy is selected from the custom strategy set as the target restoration strategy, the selection can be performed in any one of the following manners:

[0119] Manner 1: One custom restoration strategy is randomly selected from the custom strategy set as the target restoration strategy.

[0120] For example, the user randomly selects custom restoration strategy a1 or custom restoration strategy a2 from the selectable target restoration strategies as the target restoration strategy.

[0121] Manner 2: One custom restoration strategy whose priority meets a preset priority condition is selected from the custom strategy set as the target restoration strategy.

[0122] For example, the registration time of the custom restoration strategy is taken as the preset priority condition, that is, the custom restoration strategy whose registration time is closest to the current time has the highest priority. Assuming that the registration time of custom restoration strategy b1 is June 5, 2022, and the registration time of custom restoration strategy b2 is August 10, 2022, the priority of custom restoration strategy b2 is higher than that of custom restoration strategy b1, and the SDN controller automatically selects custom restoration strategy b2 as the target restoration strategy for the user.

[0123] Manner 3: One custom restoration strategy whose usage frequency meets a preset frequency condition is selected from the custom strategy set as the target restoration strategy.

[0124] For example, a usage identifier is added to each custom restoration strategy set to record the number of times it is called. Assuming that the usage identifier of custom restoration strategy b1 shows that it has been called 200 times since it was registered, and the usage identifier of custom restoration strategy b2 shows that it has been called 150 times since it was registered, the SDN controller automatically selects custom restoration strategy b1 with a higher usage frequency as the target restoration strategy for the user.

[0125] Based on the step 202, the general preconfigured restoration strategy is provided for the user in the SDN controller, which can realize the fast conversion of the configuration data to the service data, and meanwhile, supports the user-defined restoration strategy, and solves the customized demand of the user.

[0126] Step 203: Based on the target acquisition path recorded in the target service template, the target configuration data of the target service is acquired in the target device, and the target configuration data is converted into the corresponding target service data based on the target restoration strategy.

[0127] Specifically, in the embodiment of the application, when the SDN controller acquires the target configuration data of the target service in the target device based on the path list recorded in the target service template, the SDN controller reads the target acquisition path corresponding to each target configuration data in turn based on the path list recorded in the target service template, and each time a target acquisition path is read, the following operations are performed:

[0128] The preset configuration channel is called to acquire the target configuration data of the target service pointed by the current acquisition path in the target device; wherein, if the target configuration data of the target service pointed by the current acquisition path does not exist in the target device, the value of the target configuration data of the target service pointed by the current acquisition path is set to empty, and the acquired target configuration data is saved to the configuration cache area, and after all the acquisition paths are read, the SDN controller acquires the target configuration data of the target service in the configuration cache area.

[0129] For example, when the target configuration data required by the service is acquired in the switch 1 based on the target acquisition path recorded in the service template A, each time an acquisition path is read, the path information is perfected through the dependency identifier in the acquisition path, the SDN controller calls the NETCONF channel to communicate with the switch 1, acquires the target configuration data of the service a pointed by the current acquisition path, and assumes that it is the destination information of the data packet m, and then saves it to the configuration cache area, and then judges whether there is a next acquisition path in the path list, if yes, the configuration data relied by the next acquisition path is read from the configuration cache area through the dependency identifier, which is used to perfect the path information, and the next target configuration data is acquired through the NETCONF channel and the communication with the switch 1. In particular, if the target configuration data of the service a pointed by the current acquisition path is empty, for example, the next hop information of the data packet m is not recorded in the switch 1, the target configuration data is set to empty, and is saved to the configuration cache area, and when all the acquisition paths are read, the SDN controller acquires all the target configuration data of the service a from the configuration cache area.

[0130] Further, when the SDN controller converts each target configuration data into corresponding target service data based on the target restoration strategy, if there is target configuration data with a null value in each target configuration data, the target service data converted from the target configuration data with a null value is deleted.

[0131] For example, after obtaining each target configuration data of service a, the SDN controller converts each target configuration data into target service data required for executing service a based on the data conversion method saved in the target restoration strategy corresponding to service a. If there is target configuration data with a null value, in order to avoid errors in executing service a, the target service data should be pruned, i.e., the target service data converted from the target configuration data with a null value is deleted.

[0132] Step 204: Return the target service data to the service requester.

[0133] For example, the SDN controller returns the final target service data to the service requester for executing service a.

[0134] The above embodiments are further described in detail through a specific application scenario.

[0135] Referring to FIGS. 1 and 2, Figure 4 and Figure 5 the specific process of providing service data by the SDN controller in the embodiments of the present application is as follows:

[0136] The service requester x sends a service data query request x to the SDN controller for executing service d, and provides the device description information of the target device d associated with service d, i.e., manufacturer 1 + device model 2 + software version 3, and the service type of service d, i.e., type d, triggering the SDN controller to execute step 401.

[0137] Step 401: The SDN controller receives the service data query request x sent by the service requester x, and obtains the device description information of device d and the service type of service d carried in the service query request x.

[0138] Step 402: The SDN controller obtains the target service template m corresponding to service d based on the device description information of device d in the preset service template set, and obtains the target restoration strategy n corresponding to service d based on the service type of service d in the preset restoration strategy set.

[0139] Step 403: The SDN controller obtains the acquisition path of each target configuration data corresponding to service d based on the target service template m, and sequentially obtains each target configuration data from device d.

[0140] Step 404: The SDN controller converts the obtained configuration data into target service data based on the data conversion method saved in the target restoration strategy n, and performs pruning processing on the target service data.

[0141] Step 405: The SDN controller returns the final target service data to the service requester x, and completes the service data providing process.

[0142] In addition, although the operations of the method of the present application are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in this particular order, or that all of the operations shown must be performed to achieve the desired results. Additionally or alternatively, certain steps can be omitted, combined into a single step, and / or divided into multiple steps.

[0143] Based on the same technical concept, referring to Figure 6 The embodiment of the present application also provides a device for providing service data, which comprises:

[0144] The receiving module 601 is used for receiving a service data query request sent by a service requester, wherein the service data query request carries target description information of a target device and target type identification of a target service;

[0145] The matching module 602 is used for obtaining a corresponding target service template and a target restoration strategy from a preset service template set and a restoration strategy set based on the target description information and the target type identification; wherein each service template is associated with description information of a device and type identification of a service respectively, each restoration strategy is associated with description information of a device and type identification of a service respectively, each service template saves an acquisition path of each configuration data required by a corresponding service in a corresponding device, and each restoration strategy is used for converting each configuration data of a corresponding service into service data required for executing the service;

[0146] The obtaining module 603 is used for obtaining each target configuration data of the target service in the target device based on the target acquisition path recorded in the target service template, and converting each target configuration data into corresponding target service data based on the target restoration strategy;

[0147] The returning module 604 is used for returning the target service data to the service requester.

[0148] Optionally, before receiving the service data query request sent by the service requester, the receiving module 601 is further used for:

[0149] generating a corresponding service template for each service respectively, and generating a service template set based on the obtained service templates, wherein each service template is generated in the following manner:

[0150] In response to the first configuration operation, a device associated with a service is determined, and the device is provided with configuration data for implementing the service;

[0151] Based on the type of the service, an acquisition path corresponding to each configuration data and a dependency relationship between the configuration data are obtained; the dependency relationship represents an acquisition order between the configuration data;

[0152] Based on the dependency relationship between the configuration data, the acquisition path corresponding to each configuration data is stored in sequence to form a path list;

[0153] Based on the path list, the description information of the device, and the type identifier of the service, a corresponding service template is generated.

[0154] Optionally, each restoration strategy is used to convert the configuration data into service data based on an actual service scenario, and each restoration strategy is a preconfigured restoration strategy or a custom restoration strategy; wherein, the custom restoration strategies are divided into a plurality of custom strategy sets, and each custom strategy set is associated with the description information of the device and the type identifier of the service;

[0155] Then, based on the target description information and the target type identifier, the matching module 602 is specifically configured to:

[0156] If the preconfigured restoration strategy is matched and obtained based on the target description information and the target type identifier, the preconfigured restoration strategy is used as the target restoration strategy;

[0157] If the custom strategy set is matched and obtained based on the target description information and the target type identifier, a custom restoration strategy is selected from the custom strategy set as the target restoration strategy.

[0158] Optionally, when a custom restoration strategy is selected from the custom strategy set as the target restoration strategy, the matching module 602 performs any one of the following operations:

[0159] A custom restoration strategy is randomly selected from the custom strategy set as the target restoration strategy;

[0160] A custom restoration strategy with a priority that meets a preset priority condition is selected from the custom strategy set as the target restoration strategy;

[0161] A custom restoration strategy with a usage frequency that meets a preset frequency condition is selected from the custom strategy set as the target restoration strategy.

[0162] Optionally, based on the target acquisition path recorded in the target service template, when the acquisition module 603 acquires each target configuration data of the target service in the target device, the acquisition module 603 is configured to:

[0163] based on the path list recorded in the target service template, read each target configuration data corresponding to the target acquisition path in turn, wherein, each time a target acquisition path is read, the following operations are performed:

[0164] call a preset configuration channel to acquire the target configuration data of the target service pointed to by the current acquisition path in the target device; wherein, if the target configuration data of the target service pointed to by the current acquisition path does not exist in the target device, the value of the target configuration data of the target service pointed to by the current acquisition path is set to empty, and the acquired target configuration data is saved to the configuration cache area;

[0165] acquire each target configuration data of the target service in the configuration cache area.

[0166] Optionally, when each target configuration data is converted into corresponding target service data based on the target restoration strategy, the obtaining module 603 is further configured to:

[0167] if there is target configuration data with a value of empty in each target configuration data, delete the target service data converted from the target configuration data with a value of empty.

[0168] Optionally, the target description information of the target device includes any one of the following:

[0169] the manufacturer of the target device;

[0170] the manufacturer and the device model of the target device;

[0171] the manufacturer, the device model and the software version of the target device.

[0172] Based on the same technical concept, the embodiments of the present application also provide an electronic device, which can implement the method flow of providing service data provided by the above-mentioned embodiments of the present application.

[0173] In an embodiment, the electronic device can be a server, a terminal device or other electronic device.

[0174] Referring to FIG. 7, Figure 7 the electronic device can include:

[0175] at least one processor 701 and a memory 702 connected with the at least one processor 701, and the specific connection medium between the processor 701 and the memory 702 is not limited in the embodiments of the present application, Figure 7 for example, the processor 701 and the memory 702 are connected through a bus 700. The bus 700 is used to transmit data between the processor 701 and the memory 702, Figure 7The connections between the other components are shown with lines for ease of reference only; not all connections between components are shown in the figure. The bus 700 can be divided into an address bus, a data bus, a control bus, etc. for ease of reference, Figure 7 The bus 700 is shown as a single bus for ease of reference only. There can be more than one bus, or more than one type of bus, and the processor 701 can be referred to as a controller. The processor 701 can be referred to as a controller.

[0176] In the embodiments of the present application, the memory 702 stores instructions executable by the at least one processor 701. The at least one processor 701 can execute the instructions stored in the memory 702 to perform the method of providing service data discussed above. The processor 701 can implement the functions of the various modules of the apparatus shown in the figure. Figure 6 The functions of the various modules of the apparatus shown in the figure.

[0177] The processor 701 is the control center of the apparatus, and can connect all parts of the control device through various interfaces and lines. The processor 701 can monitor the entire apparatus by running or executing instructions stored in the memory 702 and calling data stored in the memory 702, thereby processing data and performing various functions of the apparatus.

[0178] In a possible design, the processor 701 can include one or more processing units. The processor 701 can integrate an application processor and a modem processor. The application processor can mainly process an operating system, a user interface, and an application program, etc. The modem processor can mainly process wireless communication. It can be understood that the modem processor can also not be integrated into the processor 701. In some embodiments, the processor 701 and the memory 702 can be implemented on the same chip, and in some embodiments, they can also be implemented on separate chips respectively.

[0179] The processor 701 can be a general-purpose processor, such as a CPU, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method of providing service data disclosed in the embodiments of the present application can be directly embodied as execution completed by a hardware processor, or executed by a combination of hardware and software modules in the processor.

[0180] The memory 702, as a non-volatile computer readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 702 can include at least one type of storage medium, for example, can include flash memory, hard disk, multimedia card, card type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. The memory 702 is any other medium capable of carrying or storing desired program codes in the form of instructions or data structures and capable of being accessed by a computer, but is not limited thereto. The memory 702 in the embodiments of the present application can also be a circuit or any other device capable of realizing a storage function, used for storing program instructions and / or data.

[0181] By designing and programming the processor 701, the code corresponding to the method of providing service data introduced in the foregoing embodiments can be fixed in the chip, so that the chip can execute the steps of the method of providing service data of the embodiments shown in the running time. Figure 3 How to design and program the processor 701 is a technology known to those skilled in the art, which will not be described here.

[0182] Based on the same inventive concept, the embodiments of the present application also provide a storage medium storing computer instructions, when the computer instructions run on a computer, the computer instructions make the computer execute the method of providing service data discussed above.

[0183] In some possible implementations, the various aspects of the method of providing service data provided by the present application can also be implemented in the form of a program product, which includes program codes, when the program product runs on a device, the program codes are used to make the control device execute the steps of the method of providing service data according to various exemplary embodiments of the present application described above in the specification.

[0184] It should be noted that, although several units or sub-units of the apparatus are mentioned in the above detailed description, such a division is merely exemplary and not mandatory. Indeed, according to an embodiment of the application, the features and functionalities of two or more units described above can be embodied in one unit. Conversely, the features and functionalities of one unit described above can be further divided into units embodied by several units.

[0185] Moreover, although the operations of the method(s) herein can be described in a particular, sequential order, this order is not meant to be a limitation and is not intended to imply that

[0186] Those of skill in the art would understand that embodiments of the present application can be provided as a method, a system, or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, and the like) embodying computer readable program code.

[0187] The present application is described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart Figure 1 one or more functions specified in the flowchart block or blocks. Figure 1 one or more functions specified in the flowchart block or blocks.

[0188] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more functions specified in the flowchart block or blocks. Figure 1 one or more functions specified in the flowchart block or blocks.

[0189] These computer program instructions can also be loaded into a computer or other programmable data processing devices, so that a series of operational steps are performed on the computer or other programmable data processing devices to generate computer-implemented processes, thus the instructions executed on the computer or other programmable data processing devices provide processes for implementing the functions specified in the flowchart Figure 1 one or more flows and / or blocks Figure 1 one or more blocks or steps of the functions specified in the flowchart

[0190] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application belong to the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these modifications and variations.

Claims

1. A method for providing business data, characterized in that, Applied to an SDN controller, the method includes: Receive a service data query request sent by a service requester, wherein the service data query request carries the target description information of the target device and the target type identifier of the target service; Based on the target description information and the target type identifier, corresponding target service templates and target restoration strategies are obtained from the preset service template set and restoration strategy set; wherein, each service template is associated with the description information of a device and the type identifier of a service, each restoration strategy is associated with the description information of a device and the type identifier of a service, each service template stores the acquisition path of each configuration data required by the corresponding service in the corresponding device, and each restoration strategy is used to convert the configuration data of the corresponding service into the service data required to execute the service; Based on the target acquisition path recorded in the target service template, the target configuration data of the target service is obtained in the target device, and the target configuration data is converted into corresponding target service data based on the target restoration strategy. The target business data is returned to the business requester.

2. The method as described in claim 1, characterized in that, Before receiving the business data query request sent by the business requester, the method further includes: For each specified service, a corresponding service template is generated, and the service template set is generated based on the obtained service templates. Each service template is generated in the following way: In response to the first configuration operation, a device associated with a service is identified, and the device is configured with various configuration data for implementing the service; Based on the business type of the aforementioned business, obtain the acquisition path corresponding to each configuration data and the dependency relationship between each configuration data; the dependency relationship represents the acquisition order between each configuration data. Based on the dependencies between the configuration data, the acquisition paths corresponding to each configuration data are stored sequentially to form a path list; Based on the path list, the description information of the device, and the type identifier of the service, a corresponding service template is generated.

3. The method as described in claim 1, characterized in that, Each restore policy is used to convert configuration data into business data based on the actual business scenario, and each restore policy can be a pre-configured restore policy or a custom restore policy; among them, each custom restore policy is divided into multiple custom policy sets, and each custom policy set is associated with the description information of a device and a service type identifier; Based on the target description information and the target type identifier, a corresponding target restoration strategy is obtained from a preset restoration strategy set, including: If a pre-configured restoration strategy is obtained based on the target description information and the target type identifier, then the pre-configured restoration strategy is used as the target restoration strategy. If a custom strategy set is obtained based on the target description information and the target type identifier, then a custom restoration strategy is selected from the custom strategy set as the target restoration strategy.

4. The method as described in claim 3, characterized in that, From the set of custom strategies, select one custom restoration strategy as the target restoration strategy, including any one of the following operations: Randomly select a custom restoration strategy from the set of custom strategies as the target restoration strategy; From the set of custom strategies, select a custom restoration strategy whose priority meets the preset priority condition as the target restoration strategy; From the set of custom strategies, select a custom restoration strategy whose usage frequency meets the preset frequency condition, and use it as the target restoration strategy.

5. The method according to any one of claims 1-4, characterized in that, The step of obtaining the target configuration data of the target service from the target device based on the target acquisition path recorded in the target service template includes: Based on the path list recorded in the target service template, the target acquisition path corresponding to each target configuration data is read sequentially. For each target acquisition path read, the following operations are performed: Call the preset configuration channel to obtain the target configuration data of the target service pointed to by the current acquisition path in the target device; wherein, if the target configuration data of the target service pointed to by the current acquisition path does not exist in the target device, the value of the target configuration data of the target service pointed to by the current acquisition path is set to empty, and the obtained target configuration data is saved to the configuration cache area. In the configuration cache area, obtain the target configuration data for each target service.

6. The method according to any one of claims 1-4, characterized in that, The target description information of the target device includes any one of the following: The manufacturer of the target equipment; The manufacturer and model of the target equipment; The manufacturer, model, and software version of the target device.

7. The method as described in claim 1, characterized in that, The step of converting the target configuration data into corresponding target business data based on the target restoration strategy further includes: If any of the target configuration data contains target configuration data with an empty value, then delete the target business data converted from the target configuration data with an empty value.

8. An apparatus for providing business data, characterized in that, include: The receiving module is used to receive a business data query request sent by the business requester. The business data query request carries the target description information of the target device and the target type identifier of the target service. The matching module is used to obtain the corresponding target service template and target restoration strategy from the preset service template set and restoration strategy set based on the target description information and the target type identifier. Each service template is associated with the description information of a device and the type identifier of a service, and each restoration strategy is associated with the description information of a device and the type identifier of a service. Each service template stores the acquisition path of each configuration data required by the corresponding service in the corresponding device, and each restoration strategy is used to convert the configuration data of the corresponding service into the service data required to execute the service. The acquisition module is used to acquire each target configuration data of the target service in the target device based on the target acquisition path recorded in the target service template, and convert each target configuration data into corresponding target service data based on the target restoration strategy. The return module is used to return the target business data to the business requester.

9. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-7.

11. A computer program product, characterized in that, When the computer program product is invoked by a computer, it causes the computer to perform the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • SDN control method and device, and SDN controller

    CN105610714A

  • Service traffic scheduling method and device

    CN109450793A