Service configuration method, system and device, electronic equipment, medium and product
By using metadata files in the SDN architecture to automatically map service models to network device configurations, the high cost and low efficiency issues caused by rapid service iteration are resolved, and efficient service configuration is achieved.
Patent Information
- Application Number
- CN202410573190.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-09
- Publication Date
- 2025-11-11
Smart Images

Figure CN120935002A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical fields of cloud technology and cloud storage, and specifically to a business configuration method, system, device, electronic device, medium, and product. Background Technology
[0002] With the rapid development of cloud networks and cloud services, the traditional unified control and forwarding network architecture has transformed into an SDN (Software Defined Network) architecture based on control-forwarding separation. SDN architecture makes the construction of virtual networks faster and more flexible. In SDN architecture, the network structure includes network devices, network device controllers, and service controllers. Typically, the service controller defines service models according to service requirements, and the network device controller configures these service models onto network devices, enabling the network devices to provide service to users based on the service models.
[0003] In related technologies, if the service controller defines a new service model, the network device controller needs to add transformation and orchestration code for that service model to realize the transformation and orchestration logic from the service model to the device-side method calls. However, this approach is mainly implemented by adding new code logic. When business iterations are rapid, developers need to frequently manually change the code and upgrade the network device controller version, resulting in high development and maintenance costs and low processing efficiency. Summary of the Invention
[0004] This application provides a service configuration method, system, device, electronic device, medium, and product that can reduce the development and maintenance costs of service configuration and improve the processing efficiency of service configuration.
[0005] On one hand, embodiments of this application provide a service configuration method, which is applied to a device controller in a target network architecture, the target network architecture including a service controller, a device controller, and at least one network device; the method includes:
[0006] When a new business model for providing business services is added to the business controller, the metadata file corresponding to the business model is determined. The metadata file indicates the mapping logic from the business model to the model configuration method associated with the business model in the network device.
[0007] Based on the metadata file, the business model is mapped using a model configuration method to obtain a configuration request for the business model. The configuration request carries the model configuration method and the request parameters required to execute the model configuration method.
[0008] A configuration request for the service model is sent to the at least one network device, so that each network device executes the model configuration method based on the request parameters and provides service using the service model configured based on the model configuration method.
[0009] On the other hand, embodiments of this application provide a service configuration method, which is applied to network devices in a target network architecture, the target network architecture including a service controller, a device controller, and at least one network device; the method includes:
[0010] When a new business model for providing business services is added to the business controller, a configuration request for the business model is received from the device controller. The configuration request carries the model configuration method and the request parameters required to execute the model configuration method.
[0011] The configuration request is obtained by mapping the business model to a model configuration method based on the metadata file of the business model. The metadata file indicates the mapping logic from the business model to the model configuration method associated with the business model in the network device.
[0012] The model configuration method is executed based on the request parameters, and business services are provided using the business model configured based on the model configuration method.
[0013] On the other hand, embodiments of this application provide a service configuration system, the system including a service controller, a device controller, and at least one network device in a target network architecture;
[0014] The business controller is used to add new business models for providing business services;
[0015] The device controller is used to determine the metadata file corresponding to the service model when a new service model for providing service is added to the service controller. The metadata file indicates the mapping logic from the service model to the model configuration method associated with the service model in the network device.
[0016] The device controller is further configured to perform model configuration method mapping processing on the business model based on the metadata file to obtain a configuration request for the business model. The configuration request carries the model configuration method and the request parameters required to execute the model configuration method.
[0017] The device controller is also configured to send a configuration request for the service model to the at least one network device;
[0018] The at least one network device is configured to receive a configuration request for the service model sent by the device controller, the configuration request carrying the model configuration method and request parameters required to execute the model configuration method;
[0019] The at least one network device is further configured to execute the model configuration method based on the request parameters, and to provide service using the service model configured based on the model configuration method.
[0020] On the other hand, embodiments of this application provide a service configuration apparatus, which is applied to a device controller in a target network architecture, the target network architecture including a service controller, a device controller, and at least one network device; the apparatus includes:
[0021] The determination module is used to determine the metadata file corresponding to the business model when a new business model for providing business services is added in the business controller. The metadata file indicates the mapping logic from the business model to the model configuration method associated with the business model in the network device.
[0022] The mapping module is used to perform model configuration method mapping processing on the business model based on the metadata file to obtain a configuration request for the business model. The configuration request carries the model configuration method and the request parameters required to execute the model configuration method.
[0023] The sending module is configured to send a configuration request for the service model to the at least one network device, so that each network device executes the model configuration method based on the request parameters and provides service using the service model configured based on the model configuration method.
[0024] In one possible implementation, the metadata file includes mapping logic from a business model to at least one model configuration method;
[0025] The mapping module includes:
[0026] A parsing unit is used to parse the model information of the business model from the metadata file;
[0027] A mapping unit is used to map at least one model configuration method for the business model based on the model information and the mapping logic corresponding to each model configuration method.
[0028] The generation unit is used to generate a configuration request corresponding to each model configuration method based on the at least one model configuration method and the request parameters corresponding to each model configuration method.
[0029] In one possible implementation, the mapping logic corresponding to each model configuration method includes at least a first logic for mapping from the business model to the method type corresponding to the model configuration method, a second logic for the corresponding request parameters, and a third logic for the corresponding response message.
[0030] The mapping unit is used for:
[0031] For each model configuration method, based on the first logic corresponding to the model configuration method and the model information of the business model, the method type information of the model configuration method is obtained;
[0032] Based on the second logic corresponding to the model configuration method and the model information of the business model, the request parameters of the model configuration method are obtained;
[0033] Based on the third logic corresponding to the model configuration method and the model information of the business model, the message type of the response message of the model configuration method is obtained.
[0034] In one possible implementation, the second logic includes parameter definition information, and the second logic also includes at least one of field mapping relationship definition information or field conversion strategy;
[0035] The mapping unit, based on the second logic corresponding to the model configuration method and the model information of the business model, obtains the request parameters of the model configuration method, specifically for:
[0036] Based on the parameter definition information in the second logic, obtain the parameter type corresponding to the request parameter;
[0037] The parameter fields corresponding to the request parameters are obtained by performing at least one of the following steps:
[0038] According to the field mapping relationship definition information in the second logic, the corresponding fields in the model information are processed by parameter field mapping to obtain the first parameter field corresponding to the request parameter. The field mapping relationship definition information includes the mapping relationship between the fields in the model information and the fields in the request parameter.
[0039] According to the field conversion strategy in the second logic, the corresponding fields in the model information are converted to obtain the second parameter field corresponding to the request parameter. The field conversion strategy includes at least one conversion strategy for converting fields from the model information to fields in the request parameter.
[0040] In one possible implementation, the configuration request includes the Remote Procedure Call (RPC) request;
[0041] The generation unit is used for:
[0042] For each model configuration method, an RPC request corresponding to the model configuration method is generated based on the method type information of the model configuration method, as well as the message type of the request parameters and response message corresponding to the model configuration method.
[0043] In one possible implementation, the at least one model configuration method includes various configuration methods corresponding to the business model in at least one configuration process;
[0044] The mapping logic corresponding to each model configuration method also includes the priority of the model configuration method in the configuration process to which it belongs;
[0045] The mapping unit is used for:
[0046] For each configuration process, based on the model information and the mapping logic of each model configuration method corresponding to the configuration process, the execution order of each model configuration method corresponding to the configuration process is mapped.
[0047] In one possible implementation, the mapping logic corresponding to each model configuration method also includes the execution conditions of the model configuration method;
[0048] The mapping unit is used for:
[0049] For each model configuration method, if the target field of the model information meets the execution condition in the mapping logic of the model configuration method, the model configuration method is mapped based on the model information and the mapping logic corresponding to the model configuration method.
[0050] In one possible implementation, at least one configuration process of the business model includes a business model creation process; the execution condition of the attribute configuration method corresponding to the creation process is that the model information contains a target attribute field;
[0051] The mapping unit is used for:
[0052] For the creation process, if the model information has a target attribute field, based on the model information and the mapping logic corresponding to the creation method and attribute configuration method of the creation process, the model creation method and model attribute configuration method corresponding to the business model in the creation process are mapped to obtain.
[0053] If the target attribute field is not present in the model information, the model creation method corresponding to the business model in the creation process is mapped based on the mapping logic between the model information and the creation method of the creation process.
[0054] In one possible implementation, the metadata file includes judgment logic for the response message returned by the network device after executing the model configuration method;
[0055] The device further includes:
[0056] The response message receiving module is used to receive, for each network device, the response message returned by the network device after executing the model configuration method;
[0057] The response message receiving module is further configured to obtain the execution result of the network device on the model configuration method based on the judgment logic and the response message, wherein the execution result includes execution success or failure.
[0058] On the other hand, embodiments of this application provide a service configuration apparatus, which is applied to network devices in a target network architecture, the target network architecture including a service controller, a device controller, and at least one network device; the apparatus includes:
[0059] The receiving module is configured to receive a configuration request for the business model sent by the device controller when a new business model for providing business services is added to the business controller. The configuration request carries the model configuration method and the request parameters required to execute the model configuration method.
[0060] The configuration request is obtained by mapping the business model to a model configuration method based on the metadata file of the business model. The metadata file indicates the mapping logic from the business model to the model configuration method associated with the business model in the network device.
[0061] The execution module is used to execute the model configuration method based on the request parameters and provide business services using the business model configured based on the model configuration method.
[0062] In one possible implementation, the device further includes:
[0063] The return module is used to return a response message to the device controller, so that the device controller can obtain the execution result of the network device based on the judgment logic in the metadata file and the response message, wherein the execution result includes execution success or failure;
[0064] The metadata file includes the logic for judging the response message returned by the network device after executing the model configuration method.
[0065] On the other hand, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the above-described business configuration method.
[0066] On the other hand, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the above-described business configuration method.
[0067] On the other hand, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described business configuration method.
[0068] The service configuration method provided in this application embodiment, when a new service model for providing service is added to the service controller, determines the metadata file corresponding to the service model so as to automatically perform model configuration method mapping processing on the service model using the metadata file, thereby obtaining a configuration request for the service model; and sends a configuration request carrying the model configuration method and request parameters to each network device in the network architecture, so that each network device executes the model configuration method and provides service using the configured service model; since the metadata file indicates the mapping logic from the service model to the model configuration method associated with the service model in the network device, the device controller can automatically implement the configuration of the service model on the network device side by parsing the file; when adding a model, there is no need to manually change a large number of model orchestration codes, reducing the development and maintenance costs of service configuration and improving the processing efficiency of service configuration. Attached Figure Description
[0069] Figure 1 A network architecture diagram of a service configuration method provided in an embodiment of this application;
[0070] Figure 2 A signaling interaction diagram illustrating a service configuration method provided in an embodiment of this application;
[0071] Figure 3 A schematic diagram of a metadata file provided in an embodiment of this application;
[0072] Figure 4 A schematic diagram illustrating a method for mapping a business model to the device side, provided in an embodiment of this application;
[0073] Figure 5 A schematic diagram illustrating another method for mapping a business model to the device side, provided in an embodiment of this application;
[0074] Figure 6 This is a schematic diagram of a model rule mapping strategy provided in an embodiment of this application;
[0075] Figure 7 A schematic diagram of an RPC request provided in an embodiment of this application;
[0076] Figure 8A schematic diagram illustrating the mapping of a business model to a device-side method request message, provided in an embodiment of this application.
[0077] Figure 9 This is a schematic diagram of the structure of a service configuration device provided in an embodiment of this application;
[0078] Figure 10 This is a schematic diagram of the structure of a service configuration device provided in an embodiment of this application;
[0079] Figure 11 This is a schematic diagram of the structure of a service configuration system provided in an embodiment of this application;
[0080] Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0081] The embodiments of this application are described below with reference to the accompanying drawings.
[0082] Those skilled in the art will understand that, unless otherwise stated, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. The terms “comprising” and “including” as used in the embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, or operation, but do not exclude implementation as other features, information, data, steps, or operations supported by this art.
[0083] It is understood that in the specific embodiments of this application, any user-related data, such as user business requests and services, requires user permission or consent when applied to specific products or technologies. Furthermore, the collection, use, and processing of this data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. In other words, if any user-related data is involved in the embodiments of this application, such data must be obtained with the user's authorization and consent, and in accordance with the relevant laws, regulations, and standards of the country and region.
[0084] Figure 1 This is a network architecture diagram illustrating a service configuration method provided in this application. Figure 1 As shown, the implementation environment includes: a service controller 101, a device controller 102, and at least one network device 103.
[0085] The service controller 101 provides a service model. The device controller 102 maps the service model to a model configuration method associated with the service model in at least one network device 103. Based on this, each network device 103 executes the model configuration method to configure the service model and provides service services using the configured service model.
[0086] In this application embodiment, the business model refers to a model used to provide business services. The business model can be configured as needed, and this application does not limit it. For example, the business model can be a VRF (Virtual Routing Forwarding) business model, a route creation model, a network tunnel creation model, etc.
[0087] like Figure 1 As shown, in one possible scenario, in the forwarding plane, when a user initiates a service request to the server, the service request can be forwarded to the server by various network devices. For example, it can be forwarded quickly through a dedicated network channel between network device 1 and network device 2, or it can be forwarded through a transmission channel between network device 1, network device 3, and network device 2; the specific channel used for forwarding can be determined by a pre-configured service model.
[0088] The service configuration method provided in this application embodiment is mainly used to configure service models in the control plane. In one possible scenario, when an administrator adds a service model (e.g., responsible for the VRF service model) on the service controller 101 in the control plane, the service controller 101 can send the service model to the device controller 102.
[0089] In device controller 102, a metadata file corresponding to the service model can be pre-configured. Device controller 102 parses this metadata file and, according to the mapping logic indicated in the metadata file, maps the service model to the model configuration method associated with that service model in the network device. This yields the model configuration method and the request parameters required to execute the model configuration method. Then, device controller 102 automatically generates a configuration request based on the model configuration method and the request parameters, and sends the configuration request to each network device in the network architecture. It should be noted that device controller 102 can be pre-configured with a model mapping program, and the above process can be implemented through this program. For example, the metadata file can be used as a key input to the model mapping program, which reads and parses the metadata file to map the service model to model configuration methods on one or more network devices.
[0090] Each network device 103 can execute the model configuration method based on the request parameters to configure a service model on the network device 103, so that the network device 103 can provide service to users using the configured service model. For example, using the VRF model to provide virtual routing forwarding service to users.
[0091] It should be noted that the service controller 101, device controller 102, network device 103, etc., can be servers, terminals, or any electronic devices. The service controller 101, device controller 102, and network device 103 can be directly or indirectly connected via wired or wireless communication, but are not limited to these methods. The specific connection can be determined based on the actual application scenario requirements, and is not limited here.
[0092] For example, a server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server or server cluster that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The aforementioned networks can include, but are not limited to, wired networks and wireless networks. Wired networks include local area networks (LANs), metropolitan area networks (MANs), and wide area networks (WANs). Wireless networks include Bluetooth, Wi-Fi, and other networks that enable wireless communication. Terminals can be smartphones (such as Android phones, iOS phones, etc.), tablets, laptops, digital radio receivers, MIDs (Mobile Internet Devices), PDAs (Personal Digital Assistants), desktop computers, in-vehicle terminals (such as in-vehicle navigation terminals, in-vehicle computers, etc.), smart speakers, smartwatches, etc.
[0093] Figure 2 This diagram illustrates the signaling interaction of a service configuration method provided in an embodiment of this application. The method can be implemented through interaction between a device controller and network devices in a target network architecture; the target network architecture includes a service controller, a device controller, and at least one network device. Figure 2 As shown, the method includes:
[0094] S201. When a new business model for providing business services is added to the business controller, the device controller determines the metadata file corresponding to the business model.
[0095] This metadata file indicates the mapping logic from the service model to the model configuration method associated with that service model in the network device. The model configuration method refers to the method of performing corresponding configuration operations for the service model on the network device. Examples include methods for creating a service model, deleting a service model, and setting the rate of a VRF model. In this embodiment, when a new service model is added, the corresponding configuration operation for that service model needs to be performed on the network device so that the network device can use the configured service model to provide service to users.
[0096] For example, a business model is mapped to a configuration method for that business model on a network device, and a business model can be mapped to one or more model configuration methods. Therefore, the mapping from a business model to a model configuration method in a network device in this application refers to the process of configuring the model configuration method that is mapped to the business model onto the network device.
[0097] For example, the metadata file can define the mapping method and mapping strategy from the service model to the model configuration method on the network device side. In this embodiment, the device controller can automatically convert the configuration method from the service model to the device side by reading and parsing the metadata file of the newly added service model.
[0098] In one possible implementation, such as Figure 3 As shown, the metadata file may include: model information of the business model, mapping logic of the business model to the model configuration method of the network device, and mapping logic of the request parameters of the business model to the model configuration method of the network device.
[0099] For example, the metadata file includes model information and may also include the following two mapping logics:
[0100] 1. Mapping logic from business model to network device model configuration method: including the definition of mapping strategy for business model to model configuration method type, method request parameter type, method response parameter type, and method return success judgment condition;
[0101] 2. Mapping logic of parameters in the model configuration method of business model information network device: including the mapping relationship from business model to device method parameters, and the conversion logic of special parameter types (e.g., conversion from enumeration type to enumeration type, conversion from list type to list type, conversion from enumeration type to boolean type, etc.).
[0102] For example, model information may include basic model information, specific model content, and other information.
[0103] The basic model information may include the model type, model identification information, etc. For example, such as... Figure 3 As shown, the basic model information in the model information may include:
[0104] (1) The modelName field indicates the type of the model;
[0105] (2) The primaryKeys field defines a unique key that identifies the model. The combination of unique keys is used to uniquely identify the model.
[0106] (3) The devicePackageName field defines the package name that the device-side method depends on.
[0107] The business model in this application embodiment can be used to define relevant product model attributes on the business side. Typically, one or more configuration operations are required on the network device to orchestrate the business model. The business model described in this application can be defined using a platform-independent and language-independent serialized data structure, for example, using the Message structure in Protobuf. The following example uses a VRF model on the business side, which can be represented as follows:
[0108]
[0109] For example, the mapping logic from the business model to the model configuration method of the network device can be represented as deviceMethodsTransform. The mapping logic from the business model to the request parameters of the model configuration method of the network device can be represented as deviceMessageTransform.
[0110] For example, the overall structure of the metadata file is shown below:
[0111]
[0112] Correspondingly, the model configuration method on the network device side can be understood as the actions of the device controller in directly configuring or managing the network device. This includes device-side methods and the configuration parameters carried by those methods (such as the RPC calls commonly used for device-side configuration and the parameters carried by those methods).
[0113] S202. The device controller performs model configuration method mapping processing on the business model based on the metadata file to obtain a configuration request for the business model.
[0114] The configuration request carries the model configuration method and the request parameters required to execute the model configuration method.
[0115] In this step, the device controller can map the business model to a model configuration method according to the mapping logic indicated by the metadata file, and generate a configuration request based on the mapped model configuration method. The configuration request is used to request the execution of the model configuration method for the business model in order to configure the business model.
[0116] In one possible implementation, a business model can be mapped to one or more model configuration methods, and the metadata file includes mapping logic from the business model to at least one model configuration method. For example, the creation process of a model VRF can include a creation method (createVrf) and a rate setting method (setVrfRate) to create the VRF and set the rate for the VRF. Accordingly, S202 includes S2021-S2023:
[0117] S2021. Parse the model information of the business model from the metadata file;
[0118] The model information may include basic information about the business model and the specific content of the model; details have been provided in S201 and will not be repeated here.
[0119] S2022. Based on the model information and the mapping logic corresponding to each model configuration method, at least one model configuration method for the business model is mapped.
[0120] For example, the mapping logic corresponding to each model configuration method carries the execution process of the network device executing that model configuration method. Through the mapping logic corresponding to each model configuration method, it is clearly defined which model configuration methods the business model maps to and how these model configuration methods are executed.
[0121] In a possible example, the deviceMethodsTransform structure block in the metadata file mainly defines how the business model will be mapped to which methods on the device side, and the conditions under which these methods are called and executed, as shown below:
[0122]
[0123]
[0124] The aforementioned metadata structure includes: metadata describing the mapping from the business model to the model configuration method on the device side for the model creation process; and metadata describing the mapping from the business model to the model configuration method on the device side for the model deletion process. Taking the creation process as an example, the creation process may contain a list of device-side method mapping descriptions, indicating one or more messages that may be executed on the device side for a model creation operation. The deletion scenario follows the same logic.
[0125] In one possible approach, for each model configuration method, the device controller can determine the model configuration method, the request parameters required to execute the model configuration method, and the response message to be returned after executing the model configuration method, based on the mapping logic of the model configuration method. For example, the mapping description metadata of the model configuration method may include relevant definitions such as the method type, request parameters, and response message of the model configuration method.
[0126] S2023. Based on the at least one model configuration method and the request parameters corresponding to each model configuration method, generate a configuration request corresponding to each model configuration method.
[0127] For example, each model configuration method may correspond to its own configuration request. For each model configuration method, the device controller can generate a configuration request corresponding to that model configuration method, the request parameters required to execute the model configuration method, and the response message to be returned after executing the model configuration method. This allows the network device to execute the model configuration method based on the request parameters and return the corresponding response message after a configuration request is subsequently sent to the network device.
[0128] In one possible implementation, the mapping logic corresponding to each model configuration method includes at least a first logic mapping the business model to the method type corresponding to the model configuration method, a second logic for the corresponding request parameters, and a third logic for the corresponding response message; accordingly, S2022 includes S2022a-S2022c:
[0129] S2022a. For each model configuration method, based on the first logic corresponding to the model configuration method and the model information of the business model, obtain the method type information of the model configuration method;
[0130] For example, such as Figure 3 As shown, in the metadata file, the name of the model configuration method can be defined in requestMethod, which is the name of the model configuration method that needs to be executed when the model is created or deleted.
[0131] S2022b: Based on the second logic corresponding to the model configuration method and the model information of the business model, obtain the request parameters of the model configuration method;
[0132] For example, such as Figure 3 As shown, in the metadata file, the parameters that need to be requested when executing the model configuration method can be defined in requestMessageRef, that is, which parameters should be passed in to call the model configuration method.
[0133] S2022c: Based on the third logic corresponding to the model configuration method and the model information of the business model, obtain the message type of the response message of the model configuration method.
[0134] For example, such as Figure 3 As shown, in the metadata file, the message type to be returned after the model configuration method is executed can be defined in responseMessage.
[0135] In one possible implementation, a business model may correspond to one or more configuration processes, such as a creation process, a deletion process, etc. Each configuration process may correspond to one or more model configuration methods; that is, some configuration processes need to be implemented by executing the model configuration method multiple times. Therefore, the at least one model configuration method includes each configuration method corresponding to the business model in at least one configuration process; wherein, the mapping logic corresponding to each model configuration method also includes the priority of the model configuration method in its respective configuration process; correspondingly, S2022 also includes S2022d:
[0136] S2022d. For each configuration process, based on the model information and the mapping logic of each model configuration method corresponding to the configuration process, the execution order of each model configuration method corresponding to the configuration process is mapped to obtain the execution order of each model configuration method.
[0137] For example, in the metadata file, the priority of model configuration methods can be defined in the priority field. For instance, the priority can be represented as a number. When a model, after mapping, requires the execution of multiple model configuration methods, the order in which these methods are executed is determined by the priority. The smaller the priority number, the higher the execution priority.
[0138] In one possible implementation, the mapping logic corresponding to each model configuration method also includes the execution conditions of the model configuration method; correspondingly, S2022 also includes S2022e:
[0139] S2022e. For each model configuration method, if the target field of the model information meets the execution conditions in the mapping logic of the model configuration method, the model configuration method is mapped based on the model information and the mapping logic corresponding to the model configuration method.
[0140] For example, such as Figure 3 As shown, in the metadata file, the conditions that must be met when the model configuration method is executed can be defined in `extension.effectCondition`, which are the execution conditions. These execution conditions can be used to measure whether the target fields of the model information meet the conditions. For example, the logic for judging based on execution conditions in this application includes:
[0141] (1) If the model information does not contain the target field, the model configuration method needs to be executed by default;
[0142] (2) If the model information contains the definition of the target field, then the execution of the model configuration method shall be further determined based on the execution conditions.
[0143] For example, the following types of method validity conditions can be defined in this execution condition:
[0144] ①"containsKey": This means that the model configuration method will be executed if the target field (such as one or more fields) exists in the model information; multiple fields are related by AND, that is, the method will only be executed if all multiple fields exist.
[0145] ②"specialKeyValue": This means that the model configuration method will be executed when the target field (such as one or more fields) in the model information has a specific value.
[0146] ③ When both "containsKey" and "specialKeyValue" exist, they are ANDed, meaning that the model configuration method will only be executed if both conditions are met.
[0147] The following is combined with Figure 3 The following is an example of the structure definition for the "{Description information related to device CreateMethod}" section:
[0148]
[0149]
[0150] It should be noted that this application only uses the description information related to the device CreateMethod as an example. The structure of "{description information related to the device DeleteMethod}" is the same as that of "{description information related to the device CreateMethod}", and will not be illustrated here.
[0151] Figure 4 This diagram illustrates the conditions under which the model configuration method is executed, from relevant fields in the business model to the device side. (Example) Figure 4 As shown, when field 1 exists in the business model, the corresponding model configuration method A on the device side is executed; when field 2 exists in the business model, the corresponding model configuration method B on the device side is executed.
[0152] In one possible implementation, at least one configuration process for the business model includes a business model creation process; the execution condition for the attribute configuration method corresponding to the creation process is that the model information exists in the target attribute field.
[0153] Based on the model information and the mapping logic corresponding to each model configuration method, at least one model configuration method for the business model is mapped, including:
[0154] For the creation process, if the model information has a target attribute field, based on the model information and the mapping logic corresponding to the creation method and attribute configuration method of the creation process, the model creation method and model attribute configuration method corresponding to the business model in the creation process are mapped to be obtained.
[0155] If the target attribute field does not exist in the model information, the model creation method corresponding to the business model in the creation process is obtained based on the mapping logic between the model information and the creation method in the creation process.
[0156] For example, typically, when a business-side model is created or deleted, one or more methods need to be called in combination to make the model orchestration effective. Here's an example of the orchestration logic for creating the aforementioned business-side TansVrf model:
[0157] (1) When the TansVrf model is created, it is usually necessary to execute rpc createVrf(VrfInfo)returns(Response){}; and rpc setVrfRate(VrfRateConfig)returns(Response); to create the VRF and set the rate for the VRF; it can be seen that the TansVrf model can only take effect by combining the two calls to the device side methods.
[0158] (2) When the TansVrf model is deleted, it is usually necessary to execute the rpc deleteVrf(VrfInfo)returns(Response){} operation to delete the vrf.
[0159] Meanwhile, the `createVrf` method takes effect by default when creating a TansVrf model, while the `setVrfRate` method is only called and takes effect under specific conditions, namely:
[0160] ① When the TansVrf operation is to create a Vrf, the device-side RPC `createVrf(VrfInfo)returns(Response){}` method is executed by default. Conversely, if the operation is to delete existing Vrf field information, the device-side RPC `deleteVrf(VrfInfo)returns(Response){}` method is executed by default.
[0161] ②For example Figure 5 As shown, the device-side `rpc setVrfRate(VrfRateConfig)returns(Response)` method is only executed when the TansVrf operation is a creation operation and the model information contains a `rate` field (`uint32rate = 2`). Simultaneously, the value of the `rate` field in the business model is passed as information in the `VrfRateConfig` message of the device-side method.
[0162] In one possible implementation, the configuration request includes the remote procedure call (RPC) request;
[0163] Based on the at least one model configuration method and the request parameters corresponding to each model configuration method, a configuration request corresponding to each model configuration method is generated, including:
[0164] For each model configuration method, an RPC request corresponding to that model configuration method is generated based on the method type information of that model configuration method, as well as the message type of the request parameters and response message corresponding to that model configuration method.
[0165] The RPC request corresponding to the model configuration method may include the method type information of the model configuration method, the corresponding request parameters, and the message type of the response message.
[0166] like Figure 6 As shown in this application, the configuration request sent by the device controller to the network device can take the form of an RPC request. Based on this, the business model can be mapped to the model configuration method to be executed on the device side through model mapping metadata, according to pre-configured model mapping rules and strategies. Specifically, the RPC can carry the method type of the model configuration method, the request message, and the response message. Among them, the request message can transmit request parameters.
[0167] like Figure 7 As shown, for each configuration request sent to the network device side, in... Figure 7Taking `rpccreateVrf(VrfInfo)returns(Response){};` as an example, it mainly consists of three parts: `requestMethod` represents the request method to the device, which is the model configuration method (such as `createVrf`); `requestMessage` represents the message content of the method request, and the parameters can be passed via messages, which represents the request parameters of the model configuration method (such as `VrfInfo`); `responseMessage` represents the method response message content, which represents the response message of the model configuration method (such as `Response`).
[0168] The following example illustrates the metadata file structure corresponding to the scenarios of creating and deleting TansVrf. Taking the relevant RPC methods required to create a business TansVrf model as an example, it may include the following: creating / deleting a TansVrf business model requires executing one or more method calls on the device sequentially (i.e., creation requires executing two method calls: `rpccreateVrf(VrfInfo)returns(Response){};` and `rpc setVrfRate(VrfRateConfig)returns(Response);`, while deletion requires executing one method call: `rpc deleteVrf(VrfInfo)returns(Response){};`). Accordingly, the metadata file structure corresponding to the scenarios of creating and deleting TansVrf is as follows:
[0169]
[0170]
[0171] In one possible implementation, the metadata file may also define field mapping logic between specific fields in the model information and specific fields in the request parameters. This second logic includes parameter definition information, and further includes at least one of field mapping relationship definition information or field conversion strategies; correspondingly, in S2022b, based on the second logic corresponding to the model configuration method and the model information of the business model, the request parameters of the model configuration method are obtained, including:
[0172] S2022b-1. Based on the parameter definition information in the second logic, obtain the parameter type corresponding to the request parameter;
[0173] For example, in the metadata file, the parameter type of the request parameter corresponding to the model configuration method in the second logic can be defined in messageType, which is the message type of the device message that transmits the parameter.
[0174] The parameter fields corresponding to the request parameters are obtained by performing at least one of the following steps:
[0175] S2022b-2. According to the field mapping relationship definition information in the second logic, perform parameter field mapping processing on the corresponding field in the model information to obtain the first parameter field corresponding to the request parameter. The field mapping relationship definition information includes the mapping relationship between the fields in the model information and the fields in the request parameter.
[0176] S2022b-3. According to the field conversion strategy in the second logic, the corresponding field in the model information is converted to obtain the second parameter field corresponding to the request parameter. The field conversion strategy includes at least one conversion strategy for converting fields from the model information to fields in the request parameter.
[0177] In S2022b-2, such as Figure 3 As shown, in the metadata file, the field mapping relationship definition information can be configured in fieldMapping, that is, to define which fields in the model information the field content in the request parameter is converted from.
[0178] In S2022b-3, such as Figure 3 As shown, the field transformation strategy can be configured via `fieldExtension` in the metadata file. Specifically, `fieldExtension` represents an extended description of the strategy referenced during device message transformation, i.e., which transformation strategies (such as enumeration-to-enumeration, enumeration-to-boolean, list field-to-list, etc.) are used for the message field (field in the request parameters); among them, the specific format for enumeration-to-enumeration and enumeration-to-boolean transformations is as follows:
[0179] (1) DEV_ENUM_CONF_ENUM: An enumeration type field in the device message, which can be converted from an enumeration type field in the model message;
[0180] The corresponding format is: {"DeviceEnum type field name": "conversion strategy reference"}. The conversion strategy is defined in the FieldMapConfigEnumToDeviceEnum.json file.
[0181] (2) DEV_BOOL_CONF_ENUM: A Boolean type field in the device message, which can be converted from the enumeration type field of the model message;
[0182] The corresponding format is: {"Device Bool type field name": "conversion strategy reference"}, where the conversion strategy is defined in the FieldMapConfigEnumToDeviceBool.json file.
[0183] (3) DEV_REPEATED_FIELD: A list type field in the device message, which can be converted from a list type field in the model;
[0184] The corresponding format is: {"Device Repeated type field name": "repeated message reference"}. For the referenced "${DEVICE_REPEATED_FIELD_REF}" message, its structure is consistent with the deviceMethodsTransform structure block, similarly identifying the mapping relationship between each element in the list field of the model and each element in the list field of the device. The repeated message reference will be described below.
[0185] Figure 8 This diagram illustrates the mapping relationship between a business model and request messages carried in a device-side method. For example... Figure 8 As shown, field 1 and field 2 in the business model can be mapped to corresponding fields in different model configuration methods on the device side. For example, field 1 in the business model can be mapped to field 1 in device method 1 and field 1 in device method 2, respectively. Field 2 in the business model can be mapped to field 2 in device method 2.
[0186] like Figure 8 As shown, for list-type fields, the DEV_REPEATED_FIELD strategy can be used, which is the conversion strategy from list-type fields in the model to list-type fields in the device message. Specifically, fields 11 and 12 of element 1 in the list field of the business model can be converted to element 1 of the list field in device method 2; correspondingly, fields 21 and 22 of element 2 in the business model can be converted to element 2 of the list field in device method 2; and fields 3 of element 3 in the business model can be converted to element 3 of the list field in device method 2.
[0187] For example, the metadata of message mapping is carried in the method request from the business model to the device side. It is defined in the structure block under deviceMethodsTransform. The following is an example of the definition of the second logic in the metadata file:
[0188]
[0189]
[0190] It should be noted that this metadata file is structurally divided into a model conversion file and a reference strategy file. The mapping logic described above can be contained in the model conversion file. That is, the model conversion file can define the mapping strategy from basic business model information to the device-side model configuration method, and the mapping strategy from business model information to the request parameters of the device-side model configuration method. Model conversion files are typically named in the format "model_name.json". For example, the model conversion file TansAclTable.json defines the mapping method from the platform model TansAclTable to the device configuration; the model conversion file TansRouteActionGroup.json, etc.
[0191] The reference strategy file defines specific descriptions of strategies for field transformations and success message determination during model transformation. These strategies are defined in a separate file and referenced by their reference IDs in the model transformation file. The reference strategy file may include:
[0192] (1) ResponseSuccessCondition.json: This file defines the conditions for determining whether the device configuration returns a success.
[0193] It should be noted that the device controller can determine the execution result represented by the response message returned by the network device based on the ResponseSuccessCondition.json file. For example, the device controller can use the success criteria defined in the policy file to determine that the model configuration method was executed successfully when the network device returns 0, and failed when it returns 1.
[0194] For example, in the ResponseSuccessCondition.json file, the success condition can be defined using the following structure:
[0195]
[0196]
[0197] Here, `${ResponseSuccessConditionName}` is the reference name of the strategy used to determine the success of the device-side method. This reference name is used when the strategy needs to be referenced in the model conversion file. Under `Condition`, the conditions for determining the device-side return success are defined. Multiple conditions can be defined, and their relationship is OR; that is, if any one of the conditions is true, the device is considered to have returned success. Each condition contains two parts of information:
[0198] ①fieldName defines the specific fields of the message returned by the device;
[0199] ② `fieldName` defines the value returned by this field when the device succeeds. Multiple values can be defined, and the determination of their validity is based on an OR condition. That is, if the value of this field in the device's returned message is one of `${FieldValue11}` or `${FieldValue12}`, the device-side method is considered successful.
[0200] (2) FieldMapStrategyMetaETB.json: This file defines the mapping strategy from the model's enum type to the boolean type in the device message;
[0201] For example, in the FieldMapStrategyMetaETB.json file, the mapping strategy from enumeration types in model information to boolean types in device messages can be defined using the following structure:
[0202]
[0203]
[0204] It should be noted that in the example above, "${ETE_STRATEGY_NAME}" represents the name of the enumeration type to enumeration type conversion strategy. When this strategy needs to be referenced in the model conversion file, the strategy name should be referenced.
[0205] Where ${DEVICE_ENUM_TYPE} represents the device-side enumeration type;
[0206] Where ${ENUM_ENUM_TYPE} represents the business model enumeration type;
[0207] The mapping relationship defined under configEnumMapToDeviceEnum is the mapping relationship between the enumeration type of the business model and the enumeration type of the device side.
[0208] (3) FieldMapStrategyMetaETE.json: This file defines the mapping strategy from the model's enumeration type to the device message's enumeration type;
[0209] For example, in the FieldMapStrategyMetaETE.json file, the following structure can be used to define the mapping strategy from enumeration types in model information to enumeration types in device messages:
[0210]
[0211]
[0212] It should be noted that in the example above, "${ETB_STRATEGY_NAME}" represents the name of the conversion strategy from enumeration type to boolean type. When this strategy needs to be referenced in the model conversion file, the strategy name should be referenced.
[0213] Where ${MODEL_ENUM_TYPE} represents the business model enumeration type;
[0214] The mapping relationship defined under configEnumToDeviceBool is the mapping relationship between the enumeration type of the business model and the boolean type on the device side.
[0215] S203, The device controller sends a configuration request for the service model to the at least one network device.
[0216] For example, the device controller can send an RPC request corresponding to each model configuration method to each network device in the target network architecture. Through S203, each network device executes the model configuration method based on the request parameters and provides service using the service model configured based on the model configuration method.
[0217] S204. The network device receives a configuration request for the service model sent by the device controller.
[0218] For example, the configuration request carries the model configuration method and the request parameters required to execute the model configuration method. For instance, the network device can parse the configuration request from the RPC request to obtain the method type of the model configuration method carried by the configuration request, as well as the request parameters and response message required to execute the model configuration method.
[0219] The configuration request is obtained by mapping the business model to the model configuration method based on the metadata file of the business model. The metadata file indicates the mapping logic from the business model to the model configuration method associated with the business model in the network device.
[0220] S205. The network device executes the model configuration method based on the request parameters and provides service using the service model configured based on the model configuration method.
[0221] The network device can execute the model configuration method based on the request parameters parsed from the RPC request, and return the corresponding response message to the device controller according to the message type of the response message parsed from the RPC request.
[0222] In one possible implementation, after the network device executes the model configuration method based on the request parameters in S205, the following interaction process is also included:
[0223] The network device returns a response message to the device controller, so that the device controller can obtain the execution result of the network device based on the judgment logic in the metadata file and the response message. The execution result includes whether the execution was successful or failed.
[0224] The metadata file includes the logic for judging the response message returned by the network device after executing the model configuration method.
[0225] Correspondingly, on the device controller side, this metadata file includes the logic for judging the response message returned after the network device executes the model configuration method; it also includes the following interaction process:
[0226] For each network device, the device controller receives the response message returned by the network device after executing the model configuration method;
[0227] Based on the judgment logic and the response message, the device controller obtains the execution result of the network device's configuration method for the model, which includes whether the execution was successful or failed.
[0228] In this step, the device controller can use the Condition in the policy file referenced in ResponseSuccessCondition.json to determine the execution result represented by the response message returned by the network device.
[0229] It should be noted that the relevant technologies are mainly implemented by adding new conversion and orchestration code. When business iterations are rapid, developers need to frequently manually change the code and upgrade the network device controller version, which results in high development and maintenance costs and low processing efficiency.
[0230] In this application, the mapping logic from the business model to the model configuration method in the network device is defined through a metadata file. By reading and parsing the predefined metadata file, automatic conversion from the model to the device-side model configuration method can be achieved. The metadata file proposed in this application specifically defines the mapping rules from the business model to the network configuration method on the device side. When a new business model is added, there is no need to change the model mapping program; only the corresponding metadata description file needs to be added to update the business model and the interface on the device side. Achieving automatic conversion from the model to the device-side method can greatly reduce the coding burden on developers, improve development efficiency, and reduce development and maintenance costs. Specifically, the method of this application can achieve the following beneficial effects:
[0231] (1) Improve development efficiency: Through metadata files, the device controller can automatically map the business model to the model configuration method of each network device, which reduces the coding burden of developers.
[0232] (2) Reduce development and maintenance costs: Since the model mapping program can automatically convert the model configuration method to the device side, when the model and device interface change, only the metadata description file needs to be updated, without modifying the application, thereby reducing development and maintenance costs.
[0233] (3) Flexibility and scalability: The metadata file proposed in this application defines the mapping rules from the business model to the device-side method. This metadata file supports the network device controller to use model mapping programs implemented in any language (such as different development languages such as C, C++, Java, Golang, etc.), which has strong flexibility and scalability.
[0234] (4) Easy to maintain: The metadata file defines detailed mapping strategies and rules, making the model conversion program easy to understand and maintain.
[0235] (5) High degree of automation: The metadata file supports a variety of mapping strategies, including the mapping strategy from business model to device-side method and the mapping strategy from business model to device-side method request message, which makes the conversion process from model to device-side method highly automated.
[0236] The service configuration method provided in this application embodiment, when a new service model for providing service is added to the service controller, determines the metadata file corresponding to the service model so as to automatically perform model configuration method mapping processing on the service model using the metadata file, thereby obtaining a configuration request for the service model; and sends a configuration request carrying the model configuration method and request parameters to each network device in the network architecture, so that each network device executes the model configuration method and provides service using the configured service model; since the metadata file indicates the mapping logic from the service model to the model configuration method associated with the service model in the network device, the device controller can automatically implement the configuration of the service model on the network device side by parsing the file; when adding a model, there is no need to manually change a large number of model orchestration codes, reducing the development and maintenance costs of service configuration and improving the processing efficiency of service configuration.
[0237] The business configuration method provided in this application involves technologies such as cloud technology, cloud storage, and cloud computing. For example, cloud computing technology can be used to realize the mapping process from business model to device-side model configuration method. Alternatively, cloud storage technology can be used to perform distributed storage for business models with increasing profits.
[0238] As we can understand, cloud computing is a computing model that distributes computing tasks across a resource pool composed of a large number of computers, enabling various application systems to obtain computing power, storage space, and information services as needed. The network providing these resources is called the "cloud." From the user's perspective, the resources in the "cloud" are infinitely scalable, readily available, on-demand, expandable, and pay-as-you-go.
[0239] As a provider of fundamental cloud computing capabilities, a cloud resource pool (referred to as a cloud platform, generally called an IaaS (Infrastructure as a Service) platform) is established. Various types of virtual resources are deployed in the resource pool for external customers to choose from. The cloud resource pool mainly includes: computing devices (virtualized machines containing operating systems), storage devices, and network devices.
[0240] Based on logical function, a PaaS (Platform as a Service) layer can be deployed on top of the IaaS (Infrastructure as a Service) layer, and a SaaS (Software as a Service) layer can be deployed on top of the PaaS layer. Alternatively, SaaS can be deployed directly on top of IaaS. PaaS is a platform for running software, such as databases and web containers. SaaS refers to various types of business software, such as web portals and bulk SMS senders. Generally speaking, SaaS and PaaS are upper layers compared to IaaS.
[0241] It is understandable that cloud storage is a new concept that has been extended and developed from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as a storage system) refers to a storage system that uses cluster applications, grid technology and distributed storage file systems to bring together a large number of storage devices of various types in the network (storage devices are also called storage nodes) to work together through application software or application interfaces to provide data storage and business access functions to the outside world.
[0242] Currently, the storage method of storage systems is as follows: Logical volumes are created. During the creation of a logical volume, physical storage space is allocated to each logical volume. This physical storage space may consist of a single storage device or the disks of several storage devices. Clients store data on a logical volume, which means storing the data on the file system. The file system divides the data into many parts, each part being an object. Each object contains not only the data but also additional information such as a data identifier (ID, ID entity). The file system writes each object to the physical storage space of that logical volume and records the storage location information of each object. Therefore, when a client requests access to data, the file system can allow the client to access the data based on the storage location information of each object.
[0243] Figure 9 This is a schematic diagram of a service configuration device provided in an embodiment of this application. The device is applied to a device controller in a target network architecture, which includes a service controller, a device controller, and at least one network device; as shown below. Figure 9 As shown, the device includes:
[0244] The determination module 901 is used to determine the metadata file corresponding to the new business model for providing business services when a new business model is added to the business controller. The metadata file indicates the mapping logic from the business model to the model configuration method associated with the business model in the network device.
[0245] The mapping module 902 is used to perform model configuration method mapping processing on the business model based on the metadata file to obtain a configuration request for the business model. The configuration request carries the model configuration method and the request parameters required to execute the model configuration method.
[0246] The sending module 903 is used to send a configuration request for the service model to the at least one network device, so that each network device executes the model configuration method based on the request parameters and provides service using the service model configured based on the model configuration method.
[0247] In one possible implementation, the metadata file includes mapping logic from the business model to at least one model configuration method;
[0248] The mapping module 902 includes:
[0249] The parsing unit is used to parse the model information of the business model from the metadata file;
[0250] The mapping unit is used to map at least one model configuration method for the business model based on the model information and the mapping logic corresponding to each model configuration method.
[0251] The generation unit is used to generate a configuration request corresponding to each model configuration method based on the at least one model configuration method and the request parameters corresponding to each model configuration method.
[0252] In one possible implementation, the mapping logic corresponding to each model configuration method includes at least a first logic for mapping from the business model to the method type corresponding to the model configuration method, a second logic for the corresponding request parameters, and a third logic for the corresponding response message.
[0253] This mapping unit is used for:
[0254] For each model configuration method, based on the first logic corresponding to the model configuration method and the model information of the business model, obtain the method type information of the model configuration method;
[0255] Based on the second logic corresponding to the model configuration method and the model information of the business model, obtain the request parameters of the model configuration method;
[0256] Based on the third logic corresponding to the model configuration method and the model information of the business model, obtain the message type of the response message of the model configuration method.
[0257] In one possible implementation, the second logic includes parameter definition information, and the second logic also includes at least one of field mapping relationship definition information or field conversion strategy;
[0258] This mapping unit, based on the second logic corresponding to the model configuration method and the model information of the business model, obtains the request parameters of the model configuration method, specifically for:
[0259] Based on the parameter definition information in the second logic, obtain the parameter type corresponding to the request parameter;
[0260] The parameter fields corresponding to the request parameters are obtained by performing at least one of the following steps:
[0261] According to the field mapping relationship definition information in the second logic, parameter field mapping processing is performed on the corresponding fields in the model information to obtain the first parameter field corresponding to the request parameter. The field mapping relationship definition information includes the mapping relationship between the fields in the model information and the fields in the request parameter.
[0262] According to the field conversion strategy in the second logic, the corresponding field in the model information is converted to obtain the second parameter field corresponding to the request parameter. The field conversion strategy includes at least one conversion strategy for converting fields from the model information to fields in the request parameter.
[0263] In one possible implementation, the configuration request includes the remote procedure call (RPC) request;
[0264] This generation unit is used for:
[0265] For each model configuration method, an RPC request corresponding to that model configuration method is generated based on the method type information of that model configuration method, as well as the message type of the request parameters and response message corresponding to that model configuration method.
[0266] In one possible implementation, the at least one model configuration method includes each configuration method corresponding to the business model in at least one configuration process;
[0267] The mapping logic for each model configuration method also includes the priority of that model configuration method in the configuration process to which it belongs;
[0268] This mapping unit is used for:
[0269] For each configuration process, based on the model information and the mapping logic of each model configuration method corresponding to the configuration process, the execution order of each model configuration method corresponding to the configuration process is mapped.
[0270] In one possible implementation, the mapping logic corresponding to each model configuration method also includes the execution conditions of the model configuration method;
[0271] This mapping unit is used for:
[0272] For each model configuration method, if the target field of the model information meets the execution conditions in the mapping logic of the model configuration method, the model configuration method is mapped based on the model information and the mapping logic corresponding to the model configuration method.
[0273] In one possible implementation, at least one configuration process for the business model includes a business model creation process; the execution condition for the attribute configuration method corresponding to the creation process is that the model information exists in the target attribute field;
[0274] This mapping unit is used for:
[0275] For the creation process, if the model information has a target attribute field, based on the model information and the mapping logic corresponding to the creation method and attribute configuration method of the creation process, the model creation method and model attribute configuration method corresponding to the business model in the creation process are mapped to be obtained.
[0276] If the target attribute field does not exist in the model information, the model creation method corresponding to the business model in the creation process is obtained based on the mapping logic between the model information and the creation method in the creation process.
[0277] In one possible implementation, the metadata file includes the logic for judging the response message returned by the network device after executing the model configuration method;
[0278] The device also includes:
[0279] The response message receiving module is used to receive the response message returned by each network device after the network device executes the model configuration method;
[0280] The response message receiving module is also used to obtain the execution result of the network device on the model configuration method based on the judgment logic and the response message, and the execution result includes whether the execution was successful or failed.
[0281] The service configuration apparatus provided in this application, when a new service model for providing service is added to the service controller, determines the metadata file corresponding to the service model so as to automatically perform model configuration method mapping processing on the service model using the metadata file, thereby obtaining a configuration request for the service model; and sends a configuration request carrying the model configuration method and request parameters to each network device in the network architecture so that each network device executes the model configuration method and provides service using the configured service model; since the metadata file indicates the mapping logic from the service model to the model configuration method associated with the service model in the network device, the device controller can automatically implement the configuration of the service model on the network device side by parsing the file; when adding a model, there is no need to manually change a large number of model orchestration codes, reducing the development and maintenance costs of service configuration and improving the processing efficiency of service configuration.
[0282] Figure 10 This is a schematic diagram of a service configuration device provided in an embodiment of this application. The device is applied to network devices in a target network architecture, which includes a service controller, a device controller, and at least one network device; as shown below. Figure 10 As shown, the device includes:
[0283] The receiving module 1001 is used to receive a configuration request for the service model sent by the device controller when a new service model for providing service is added to the service controller. The configuration request carries the model configuration method and the request parameters required to execute the model configuration method.
[0284] The configuration request is obtained by mapping the business model to the model configuration method based on the metadata file of the business model. The metadata file indicates the mapping logic from the business model to the model configuration method associated with the business model in the network device.
[0285] The execution module 1002 is used to execute the model configuration method based on the request parameters and provide business services using the business model configured based on the model configuration method.
[0286] In one possible implementation, the device further includes:
[0287] The return module is used to return a response message to the device controller so that the device controller can obtain the execution result of the network device based on the judgment logic in the metadata file and the response message. The execution result includes whether the execution was successful or failed.
[0288] The metadata file includes the logic for judging the response message returned by the network device after executing the model configuration method.
[0289] The service configuration apparatus provided in this application, when a new service model for providing service is added to the service controller, determines the metadata file corresponding to the service model so as to automatically perform model configuration method mapping processing on the service model using the metadata file, thereby obtaining a configuration request for the service model; and sends a configuration request carrying the model configuration method and request parameters to each network device in the network architecture so that each network device executes the model configuration method and provides service using the configured service model; since the metadata file indicates the mapping logic from the service model to the model configuration method associated with the service model in the network device, the device controller can automatically implement the configuration of the service model on the network device side by parsing the file; when adding a model, there is no need to manually change a large number of model orchestration codes, reducing the development and maintenance costs of service configuration and improving the processing efficiency of service configuration.
[0290] Figure 11 This is a schematic diagram of the structure of a service configuration system provided in an embodiment of this application. Figure 11 As shown, the system includes a service controller 1101, a device controller 1102, and at least one network device 1103 in the target network architecture;
[0291] The business controller 1101 is used to add new business models for providing business services;
[0292] The device controller 1102 is used to determine the metadata file corresponding to the service model when a new service model for providing service is added to the service controller. The metadata file indicates the mapping logic from the service model to the model configuration method associated with the service model in the network device.
[0293] The device controller 1102 is also used to perform model configuration method mapping processing on the business model based on the metadata file to obtain a configuration request for the business model. The configuration request carries the model configuration method and the request parameters required to execute the model configuration method.
[0294] The device controller 1102 is also configured to send a configuration request for the service model to the at least one network device;
[0295] The at least one network device 1103 is configured to receive a configuration request for the service model sent by the device controller, the configuration request carrying the model configuration method and the request parameters required to execute the model configuration method;
[0296] The at least one network device 1103 is also used to execute the model configuration method based on the request parameters and to provide service using the service model configured based on the model configuration method.
[0297] The service configuration system provided in this application embodiment, when a new service model for providing service is added to the service controller, determines the metadata file corresponding to the service model so as to automatically perform model configuration method mapping processing on the service model using the metadata file, and obtain a configuration request for the service model; and sends a configuration request carrying the model configuration method and request parameters to each network device in the network architecture so that each network device executes the model configuration method and uses the configured service model to provide service. Since the metadata file indicates the mapping logic from the service model to the model configuration method associated with the service model in the network device, the device controller can automatically implement the configuration of the service model on the network device side by parsing the file; when adding a model, there is no need to manually change a large number of model orchestration codes, reducing the development and maintenance costs of service configuration and improving the processing efficiency of service configuration.
[0298] The apparatus in this application embodiment can execute the method provided in this application embodiment, and the implementation principle is similar. The actions performed by each module in the apparatus of each embodiment of this application correspond to the steps in the method of each embodiment of this application. For detailed functional descriptions of each module of the apparatus, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.
[0299] Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. For example... Figure 12 As shown, the electronic device includes: a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement a service configuration method, which, compared with related technologies, can achieve:
[0300] In one alternative embodiment, an electronic device is provided, such as Figure 12 As shown, Figure 12 The illustrated electronic device 1200 includes a processor 1201 and a memory 1203. The processor 1201 and the memory 1203 are connected, for example, via a bus 1202. Optionally, the electronic device 1200 may further include a transceiver 1204, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 1204 is not limited to one type, and the structure of the electronic device 1200 does not constitute a limitation on the embodiments of this application.
[0301] Processor 1201 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 1201 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0302] Bus 1202 may include a pathway for transmitting information between the aforementioned components. Bus 1202 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 1202 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 12 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0303] The memory 1203 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.
[0304] The memory 1203 is used to store computer programs that execute the embodiments of this application, and the execution is controlled by the processor 1201. The processor 1201 is used to execute the computer programs stored in the memory 1203 to implement the steps shown in the foregoing method embodiments.
[0305] Electronic devices include, but are not limited to: device controllers, network devices, servers, terminals, or cloud computing center equipment.
[0306] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the steps and corresponding content of the aforementioned method embodiments.
[0307] This application also provides a computer program product, including a computer program that, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.
[0308] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0309] Those skilled in the art will understand that, unless otherwise stated, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. The terms “comprising” and “including” as used in the embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, or operation, but do not exclude implementation as other features, information, data, steps, or operations supported by this art.
[0310] The terms "first," "second," "third," "fourth," "1," "2," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown in the figures or text.
[0311] It should be understood that although arrows indicate various operation steps in the flowcharts of this application's embodiments, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of this application's embodiments, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all steps in each flowchart, based on the actual implementation scenario, may include multiple sub-steps or multiple stages. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and this application's embodiments do not limit this.
[0312] The above description is only an optional implementation method for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application without departing from the technical concept of this application also fall within the protection scope of the embodiments of this application.
Claims
1. A business configuration method, characterized in that, The method is applied to a device controller in a target network architecture, the target network architecture including a service controller, a device controller, and at least one network device; the method includes: When a new business model for providing business services is added to the business controller, the metadata file corresponding to the business model is determined. The metadata file indicates the mapping logic from the business model to the model configuration method associated with the business model in the network device. Based on the metadata file, the business model is mapped using a model configuration method to obtain a configuration request for the business model. The configuration request carries the model configuration method and the request parameters required to execute the model configuration method. A configuration request for the service model is sent to the at least one network device, so that each network device executes the model configuration method based on the request parameters and provides service using the service model configured based on the model configuration method.
2. The method according to claim 1, characterized in that, The metadata file includes mapping logic from the business model to at least one model configuration method; The process of mapping the business model based on the metadata file to obtain a configuration request for the business model includes: The model information of the business model is obtained by parsing the metadata file; Based on the model information and the mapping logic corresponding to each model configuration method, at least one model configuration method for the business model is obtained; Based on the at least one model configuration method and the request parameters corresponding to each model configuration method, a configuration request corresponding to each model configuration method is generated.
3. The method according to claim 2, characterized in that, The mapping logic corresponding to each model configuration method includes at least a first logic for mapping from the business model to the method type corresponding to the model configuration method, a second logic for the corresponding request parameters, and a third logic for the corresponding response message. The mapping logic based on the model information and each model configuration method to obtain at least one model configuration method for the business model includes: For each model configuration method, based on the first logic corresponding to the model configuration method and the model information of the business model, the method type information of the model configuration method is obtained; Based on the second logic corresponding to the model configuration method and the model information of the business model, the request parameters of the model configuration method are obtained; Based on the third logic corresponding to the model configuration method and the model information of the business model, the message type of the response message of the model configuration method is obtained.
4. The method according to claim 3, characterized in that, The second logic includes parameter definition information, and the second logic also includes at least one of field mapping relationship definition information or field conversion strategy; The step of obtaining the request parameters of the model configuration method based on the second logic corresponding to the model configuration method and the model information of the business model includes: Based on the parameter definition information in the second logic, obtain the parameter type corresponding to the request parameter; The parameter fields corresponding to the request parameters are obtained by performing at least one of the following steps: According to the field mapping relationship definition information in the second logic, the corresponding fields in the model information are processed by parameter field mapping to obtain the first parameter field corresponding to the request parameter. The field mapping relationship definition information includes the mapping relationship between the fields in the model information and the fields in the request parameter. According to the field conversion strategy in the second logic, the corresponding fields in the model information are converted to obtain the second parameter field corresponding to the request parameter. The field conversion strategy includes at least one conversion strategy for converting fields from the model information to fields in the request parameter.
5. The method according to claim 3, characterized in that, The configuration request includes the Remote Procedure Call (RPC) request; The step of generating a configuration request corresponding to each model configuration method based on the at least one model configuration method and the request parameters corresponding to each model configuration method includes: For each model configuration method, an RPC request corresponding to the model configuration method is generated based on the method type information of the model configuration method, as well as the message type of the request parameters and response message corresponding to the model configuration method.
6. The method according to claim 3, characterized in that, The at least one model configuration method includes each configuration method corresponding to the business model in at least one configuration process; The mapping logic corresponding to each model configuration method also includes the priority of the model configuration method in the configuration process to which it belongs; The step of mapping at least one model configuration method for the business model based on the model information and the mapping logic corresponding to each model configuration method further includes: For each configuration process, based on the model information and the mapping logic of each model configuration method corresponding to the configuration process, the execution order of each model configuration method corresponding to the configuration process is mapped.
7. The method according to claim 3, characterized in that, The mapping logic corresponding to each model configuration method also includes the execution conditions of that model configuration method; The step of mapping at least one model configuration method for the business model based on the model information and the mapping logic corresponding to each model configuration method further includes: For each model configuration method, if the target field of the model information meets the execution condition in the mapping logic of the model configuration method, the model configuration method is mapped based on the model information and the mapping logic corresponding to the model configuration method.
8. The method according to claim 7, characterized in that, At least one configuration process for the business model includes a business model creation process; the execution condition for the attribute configuration method corresponding to the creation process is that the model information contains a target attribute field; The mapping logic based on the model information and each model configuration method to obtain at least one model configuration method for the business model includes: For the creation process, if the model information has a target attribute field, based on the model information and the mapping logic corresponding to the creation method and attribute configuration method of the creation process, the model creation method and model attribute configuration method corresponding to the business model in the creation process are mapped to obtain. If the target attribute field is not present in the model information, the model creation method corresponding to the business model in the creation process is mapped based on the mapping logic between the model information and the creation method of the creation process.
9. The method according to claim 1, characterized in that, The metadata file includes the logic for judging the response message returned by the network device after executing the model configuration method; The method further includes: For each network device, receive the response message returned by the network device after executing the model configuration method; Based on the judgment logic and the response message, the execution result of the network device on the model configuration method is obtained, and the execution result includes whether the execution was successful or failed.
10. A service configuration method, characterized in that, The method is applied to network devices in a target network architecture, the target network architecture including a service controller, a device controller, and at least one network device; the method includes: When a new business model for providing business services is added to the business controller, a configuration request for the business model is received from the device controller. The configuration request carries the model configuration method and the request parameters required to execute the model configuration method. The configuration request is obtained by mapping the business model to a model configuration method based on the metadata file of the business model. The metadata file indicates the mapping logic from the business model to the model configuration method associated with the business model in the network device. The model configuration method is executed based on the request parameters, and business services are provided using the business model configured based on the model configuration method.
11. The method according to claim 10, characterized in that, After executing the model configuration method based on the request parameters, the method further includes: A response message is returned to the device controller so that the device controller can obtain the execution result of the network device based on the judgment logic in the metadata file and the response message. The execution result includes whether the execution was successful or failed. The metadata file includes the logic for judging the response message returned by the network device after executing the model configuration method.
12. A service configuration device, characterized in that, The apparatus is applied to a device controller in a target network architecture, the target network architecture including a service controller, a device controller, and at least one network device; the apparatus includes: The determination module is used to determine the metadata file corresponding to the business model when a new business model for providing business services is added in the business controller. The metadata file indicates the mapping logic from the business model to the model configuration method associated with the business model in the network device. The mapping module is used to perform model configuration method mapping processing on the business model based on the metadata file to obtain a configuration request for the business model. The configuration request carries the model configuration method and the request parameters required to execute the model configuration method. The sending module is configured to send a configuration request for the service model to the at least one network device, so that each network device executes the model configuration method based on the request parameters and provides service using the service model configured based on the model configuration method.
13. A service configuration device, characterized in that, The apparatus is applied to network devices in a target network architecture, the target network architecture including a service controller, a device controller, and at least one network device; the apparatus includes: The receiving module is configured to receive a configuration request for the business model sent by the device controller when a new business model for providing business services is added to the business controller. The configuration request carries the model configuration method and the request parameters required to execute the model configuration method. The configuration request is obtained by mapping the business model to a model configuration method based on the metadata file of the business model. The metadata file indicates the mapping logic from the business model to the model configuration method associated with the business model in the network device. The execution module is used to execute the model configuration method based on the request parameters and provide business services using the business model configured based on the model configuration method.
14. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the service configuration method according to any one of claims 1 to 11.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the service configuration method according to any one of claims 1 to 11.
16. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the service configuration method according to any one of claims 1 to 11.