Device configuration method and apparatus, storage medium, and electronic device
By converting the configuration data of the business layer into the data structure of the capability layer through the target engine, the problem of data structure differences between the user interface and firewall device configuration management is solved, thereby improving the scalability and robustness of the firewall device management platform.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-23
- Publication Date
- 2026-04-07
AI Technical Summary
In existing technologies, the business logic on the user interface side differs greatly from the data structure of firewall device configuration management, resulting in poor business scalability of firewall device configuration management.
The target engine converts the configuration data of the business layer into the data structure of the capability layer, generates multiple second configuration data using the target transformation strategy, and manages the configuration of multiple target devices through the capability layer, thereby achieving decoupling between the upper and lower layers.
It improves the scalability and robustness of the centralized management platform for firewall devices, reduces redundant code development, and improves development efficiency.
Smart Images

Figure CN116016161B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically, to a device configuration method, apparatus, storage medium, and electronic device. Background Technology
[0002] For medium to large enterprises, the sheer number of branch firewalls necessitates a unified management platform for their management. Currently, mainstream centralized firewall management platforms need to enable the distribution and management of various configurations for different firewalls, and should also provide an entry point for distributing and managing configurations for individual firewalls.
[0003] In related technologies, managing a firewall configuration on a centralized management platform typically involves the following steps:
[0004] Step 1: Implement a set of business logic for display to the UI (User Interface) client.
[0005] Step 2: Implement a set of firewall device configuration distribution and management processing logic for firewall devices.
[0006] Step 3: Implement a process for generating and changing private configurations for each device bound to the template service when performing operations on the template service.
[0007] However, the following problems often arise during the above processing steps:
[0008] Question 1: The data structures for business display on the UI and configuration management on the firewall often differ significantly. Defining them as a single set often results in high coupling between the upper and lower layers of business logic, severely impacting the scalability and robustness of the business.
[0009] Question 2: When processing each template service, it is necessary to implement a set of business logic that converts the template service into the corresponding private configuration for the firewall. This process requires the implementation of a large amount of business code.
[0010] There is currently no effective solution to the above problems. Summary of the Invention
[0011] This invention provides a device configuration method, apparatus, storage medium, and electronic device to at least solve the technical problem in related technologies where the business logic of the user interface and the data structure of firewall device configuration management differ greatly, resulting in poor business scalability for firewall device configuration management.
[0012] According to one aspect of the present invention, a device configuration method is provided, applied in a target engine, comprising: receiving first configuration data sent by a service layer, wherein the service layer is a user-oriented device configuration layer for centralized management of multiple target devices, and the first configuration data is generated by a template-type service initiated by the service layer; invoking a target conversion strategy to convert the first configuration data to obtain multiple second configuration data, wherein the target conversion strategy is used to convert the data structure of the configuration data of the service layer into the data structure of the capability layer, and the second configuration data includes at least: configuration data for configuring a single target device, and the capability layer is used to configure the target device; invoking a data sending interface associated with the multiple second configuration data to send the multiple second configuration data to the capability layer; and configuring the multiple target devices through the capability layer based on the multiple second configuration data.
[0013] Further, the first configuration data is transformed by invoking a target transformation strategy to obtain multiple second configuration data, including: obtaining the target association relationship in the target engine through the target transformation strategy, wherein the target association relationship includes at least: the association relationship between the configuration data of the business layer and the configuration data of the capability layer for device configuration of the target device, and the association relationship between the configuration data of the business layer and the target device; and determining multiple second configuration data associated with the first configuration data based on the target association relationship.
[0014] Further, based on the target association relationship, determining a plurality of second configuration data associated with the first configuration data includes: obtaining a target service associated with a template-type service corresponding to the first configuration data, wherein the target service is a sub-service of the template-type service corresponding to the first configuration data; obtaining second configuration data of the target service; and determining a plurality of second configuration data associated with the first configuration data based on the second configuration data of the target service and the target association relationship.
[0015] Furthermore, based on multiple sets of second configuration data, the capability layer performs device configuration on multiple target devices, including: obtaining third configuration data of template-type services associated with the first configuration data, wherein the third configuration data is multiple sets of second configuration data from historical time; comparing the multiple sets of second configuration data with the third configuration data to obtain a comparison result; and configuring the multiple target devices based on the comparison result and the reference relationship between the multiple sets of second configuration data.
[0016] Further, based on the comparison results and the reference relationships between the multiple second configuration data, device configuration is performed on the multiple target devices, including: based on the comparison results, determining newly added configuration data among the multiple second configuration data, and sending the newly added configuration data to the target devices associated with the newly added configuration data according to the ascending order of the generation order of the newly added configuration data; based on the comparison results, determining reduced configuration data among the multiple second configuration data, and deleting the configuration associated with the reduced configuration data in the target devices associated with the reduced configuration data according to the descending order of the generation order of the reduced configuration data; based on the comparison results, determining modified configuration data among the multiple second configuration data, calling the preset editing method of the capability layer, and using the preset editing method to modify the configuration of each target device associated with the modified configuration data.
[0017] Furthermore, the device configuration method also includes: establishing a directed acyclic graph of the multiple target configuration data based on the reference relationships between the multiple target configuration data, wherein the target configuration data includes: the newly added configuration data or the reduced configuration data; and obtaining the generation order of the multiple target configuration data based on the directed acyclic graph using a graph algorithm.
[0018] Furthermore, before configuring the multiple target devices through the capability layer based on the multiple second configuration data, a distributed lock is established for each target device; after configuring the multiple target devices through the capability layer based on the multiple second configuration data, the distributed lock of each target device is released.
[0019] According to another aspect of the present invention, a device configuration apparatus is also provided, applied in a target engine, comprising: a receiving module, configured to receive first configuration data sent by a service layer, wherein the service layer is a user-oriented device configuration layer for centralized management of multiple target devices, and the first configuration data is generated by a template-type service initiated by the service layer; a calling module, configured to call a target conversion strategy to convert the first configuration data to obtain multiple second configuration data, wherein the target conversion strategy is used to convert the data structure of the configuration data of the service layer into the data structure of the capability layer, and the second configuration data includes at least: configuration data for configuring a single target device, and the capability layer is used to configure the target device; a sending module, configured to call a data sending interface associated with the multiple second configuration data to send the multiple second configuration data to the capability layer; and a configuration module, configured to configure the multiple target devices through the capability layer based on the multiple second configuration data.
[0020] Furthermore, the invocation module includes: an acquisition unit, configured to acquire target association relationships in the target engine through the target conversion strategy, wherein the target association relationships include at least: the association relationship between the configuration data of the business layer and the configuration data of the capability layer for device configuration of the target device, and the association relationship between the configuration data of the business layer and the target device; and a determination unit, configured to determine a plurality of second configuration data associated with the first configuration data based on the target association relationships.
[0021] Further, the determining unit includes: a first obtaining submodule, used to obtain a target service associated with the template-type service corresponding to the first configuration data, wherein the target service is a sub-service of the template-type service corresponding to the first configuration data; a second obtaining submodule, used to obtain second configuration data of the target service; and a first determining submodule, used to determine a plurality of second configuration data associated with the first configuration data based on the second configuration data of the target service and the target association relationship.
[0022] Furthermore, the configuration module includes: an acquisition unit, used to acquire third configuration data of template-type services associated with the first configuration data, wherein the third configuration data is multiple second configuration data from historical time; a comparison unit, used to compare the multiple second configuration data with the third configuration data to obtain a comparison result; and a configuration unit, used to configure multiple target devices based on the comparison result and the reference relationship between the multiple second configuration data.
[0023] Further, the configuration unit includes: a processing submodule, configured to determine new configuration data among a plurality of second configuration data based on the comparison result, and to send the new configuration data to the target device associated with the new configuration data according to the ascending order of the generation order of the new configuration data; a second determining submodule, configured to determine reduced configuration data among a plurality of second configuration data based on the comparison result, and to delete the configuration associated with the reduced configuration data in the target device associated with the reduced configuration data according to the descending order of the generation order of the reduced configuration data; and a third determining submodule, configured to determine modified configuration data among a plurality of second configuration data based on the comparison result, to call the preset editing method of the capability layer, and to modify the configuration of each target device associated with the modified configuration data using the preset editing method.
[0024] Furthermore, the configuration unit also includes: a building submodule, used to build a directed acyclic graph of the multiple target configuration data based on the reference relationships between the multiple target configuration data, wherein the target configuration data includes: the newly added configuration data or the reduced configuration data; and a calculation submodule, used to obtain the generation order of the multiple target configuration data based on the directed acyclic graph and through a graph algorithm.
[0025] Furthermore, the device configuration apparatus further includes: an establishment module, configured to establish a distributed lock for each of the target devices before configuring the multiple target devices through the capability layer based on multiple sets of the second configuration data; and a release module, configured to release the distributed lock of each target device after configuring the multiple target devices through the capability layer based on multiple sets of the second configuration data.
[0026] According to another aspect of the present invention, an electronic device is also provided, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the device configuration method of any of the above-mentioned methods by executing the executable instructions.
[0027] According to another aspect of the present invention, a computer-readable storage medium is also provided, which stores a computer program, wherein the computer program controls the device where the computer-readable storage medium is located to execute any of the above-described device configuration methods when it is running.
[0028] In this invention, first configuration data sent by the service layer is received. The service layer is a user-oriented device configuration layer that centrally manages multiple target devices. The first configuration data is generated by a template-based service initiated by the service layer. A target conversion strategy is invoked to convert the first configuration data, resulting in multiple second configuration data sets. This target conversion strategy converts the data structure of the service layer's configuration data into the data structure of the capability layer. Each second configuration data set includes at least configuration data for configuring a single target device, which the capability layer uses to configure the target devices. A data sending interface associated with the multiple second configuration data sets is invoked to send the multiple second configuration data sets to the capability layer. Based on the multiple second configuration data sets, the capability layer configures the multiple target devices. This solves the technical problem in related technologies where the significant difference between the business logic of the user interface and the data structure of firewall device configuration management leads to poor scalability of the business configuration management for firewall devices. In this invention, the first configuration data of the business layer is converted into multiple second configuration data that can be sent to the target device for device configuration by the target engine. This avoids the situation where the business logic of the business layer and the processing logic for configuration management of firewall devices need to be defined as a set, thereby achieving the technical effect of improving the scalability and robustness of the management platform for centralized management of firewall devices. Attached Figure Description
[0029] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0030] Figure 1 This is a flowchart of an optional device configuration method according to an embodiment of the present invention;
[0031] Figure 2 This is a schematic diagram of an optional hierarchical calling relationship according to an embodiment of the present invention;
[0032] Figure 3 This is a schematic diagram illustrating an optional delivery of services involving service cascading according to an embodiment of the present invention;
[0033] Figure 4 This is a schematic diagram of an optional engine processing flow according to an embodiment of the present invention;
[0034] Figure 5 This is a schematic diagram of the state machine transition of an optional additional configuration according to an embodiment of the present invention;
[0035] Figure 6 This is a schematic diagram of the state machine transition for an optional update configuration according to an embodiment of the present invention;
[0036] Figure 7 This is a schematic diagram of the state machine transition for an optional deletion configuration according to an embodiment of the present invention;
[0037] Figure 8 This is a schematic diagram of an optional Kahn algorithm according to an embodiment of the present invention;
[0038] Figure 9 This is a schematic diagram of an optional distributed lock according to an embodiment of the present invention;
[0039] Figure 10 This is a schematic diagram of an optional device configuration apparatus according to an embodiment of the present invention. Detailed Implementation
[0040] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0041] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention 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 the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0042] For ease of description, some terms or nouns involved in the various embodiments of the present invention are explained below:
[0043] Business Layer: Also known as the upper layer, this is the user-facing layer. This layer primarily carries and encapsulates business logic. It mainly implements batch configuration management, i.e., template-based businesses that require centralized management of many devices.
[0044] Capability Layer: Also known as the lower layer, this layer is for managed firewalls. It provides an entry point for managing the configuration (private configuration) of individual devices, as well as enabling the distribution and status logging of individual firewalls.
[0045] Engine: The business engine is the medium for conversion between the upper and lower layers. The engine implements a set of general logic that can automatically convert batch business processing logic into processing of single device configuration in the capability layer.
[0046] props: Parameters passed from the business layer to the engine, including configuration data structures defined by the business layer and device information.
[0047] Ssuco: Sub-solution unified configuration object, an entity that describes user intent and translates user intent into configuration content logic. It's a method for transforming props into the data structures needed for the capability layer.
[0048] State machine: A technique in computers that uses events to drive state changes, allowing programs to proceed according to logic.
[0049] DAG (Directed Acyclic Graph): A type of graph that does not form cycles. It is often used to represent the driving dependencies between events and to manage the scheduling of tasks. Example 1
[0050] According to an embodiment of the present invention, an optional device configuration method embodiment is provided, which is applied to a target engine. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0051] Figure 1 This is a flowchart of an optional device configuration method according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:
[0052] Step S101: Receive the first configuration data sent by the service layer, wherein the service layer is a user-oriented device configuration layer that centrally manages multiple target devices, and the first configuration data is generated by the template-type service initiated by the service layer.
[0053] The target device mentioned above can be a firewall device. It can call a common method through various template services in the business layer, passing in props (corresponding to the first configuration data mentioned above). The engine layer where the target engine is located can receive the props sent by the template services in the business layer.
[0054] The aforementioned business layer can implement methods for operating on template business (i.e. template-type business), and the engine layer provides a ssuco (target conversion strategy) to convert the data structure passed from the business layer to the data structure of the capability layer.
[0055] Step S102: Invoke the target conversion strategy to convert the first configuration data to obtain multiple second configuration data. The target conversion strategy is used to convert the data structure of the configuration data of the business layer into the data structure of the capability layer. The second configuration data includes at least: configuration data for configuring a single target device. The capability layer is used to configure the target device.
[0056] The aforementioned target transformation strategy can be used to convert the data structure of configuration data in the business layer into the data structure of the capability layer. This strategy can transform the first configuration data to obtain multiple second configuration data sets. For example, through the common CRUD interfaces provided by the engine layer, each template-type business can call a common method, passing in props. The engine (i.e., the target engine) will then perform the transformation using the ssuco specified by the template-type business (corresponding to the aforementioned target transformation strategy), resulting in multiple second configuration data sets.
[0057] The aforementioned capability layer enables the creation, deletion, modification, querying, and distribution of configuration data on a single device, and its standardized naming facilitates engine access.
[0058] Step S103: Call the data sending interface associated with multiple second configuration data to send the multiple second configuration data to the capability layer.
[0059] The target engine automatically calls the CRUD (Create, Read, Update, Delete) interfaces of various private configurations (corresponding to the multiple second configuration data mentioned above) involved in the template in the business layer, and distributes them to the target devices, thereby achieving batch distribution to the business-related devices. In this process, the user only perceives the business being distributed to the firewall, but the actual distribution operation can be achieved by the engine using the operations of each atomic configuration in the capability layer.
[0060] Step S104: Based on multiple second configuration data, configure multiple target devices through the capability layer.
[0061] In this embodiment, configuration of multiple target devices can be achieved by sending each second configuration data to the target devices associated with it.
[0062] In this embodiment, the target engine achieves separation and decoupling of upper-layer and lower-layer business logic. Developers can focus on template-based business logic or private configurations, dividing the work into layers (business layer and capability layer). The business layer can focus on processing business logic, defining its data structure, and performing template-based business logic. The capability layer can focus on configuration distribution and comparison logic. The business layer only needs to implement the conversion logic (i.e., ssuco) from the data structure defined by the business layer to the data structure defined by the capability layer at the engine layer.
[0063] Figure 2This is a schematic diagram illustrating an optional hierarchical calling relationship according to an embodiment of the present invention, such as... Figure 2 As shown, the engine provides a set of methods for batch creation, updating, deletion, or distribution of private configurations (multiple second configuration data) by passing props (first configuration data) through the business layer and processing them through the engine layer's business ssuco (target transformation strategy). The engine's general processing logic enables batch creation, updating, deletion, or distribution of private configurations (multiple second configuration data). This decouples the template-based business processing logic for batch configuration of multiple firewalls from the single-firewall configuration and distribution logic. This frees developers from having to implement a separate set of logic at the capability layer for creation, updating, deletion (recycling), and batch distribution. It also eliminates the need for various business processes to consider device handling when processing business templates, greatly reducing redundant code development.
[0064] Through the above steps, in this embodiment, the target engine converts the first configuration data of the business layer into multiple second configuration data that can be distributed to the target device for device configuration. This avoids the situation where the business logic of the business layer and the processing logic for configuring and managing firewall devices need to be defined as a single set, thereby achieving the technical effect of improving the scalability and robustness of the management platform for centralized management of firewall devices. Furthermore, it solves the technical problem in related technologies where the business logic on the user interface side and the data structure of firewall device configuration management differ greatly, resulting in poor business scalability for configuring and managing firewall devices.
[0065] Optionally, the target transformation strategy is invoked to transform the first configuration data to obtain multiple second configuration data, including: obtaining the target association relationship in the target engine through the target transformation strategy, wherein the target association relationship includes at least: the association relationship between the configuration data of the business layer and the configuration data of the capability layer for configuring the target device, and the association relationship between the configuration data of the business layer and the target device; and determining multiple second configuration data associated with the first configuration data based on the target association relationship.
[0066] In this embodiment, the engine (i.e., the target engine) provides an abstract class called ssuco. Different services can inherit from and implement its abstract methods to implement their own ssuco, thereby enabling the conversion of props to the private configuration data structure of the capability layer. The engine can store the association between the incoming service configuration (corresponding to the configuration data of the aforementioned service layer) and the generated private configuration, as well as the association between the service configuration and the device. Based on the target association, multiple second configuration data associated with the first configuration data can be determined. Through the target conversion strategy, the data structure of the configuration data transmitted from the service layer is converted into multiple second configuration data. This facilitates the conversion of template-based services initiated by the service layer for batch configuration of multiple devices into the private configuration of the devices associated with the service. This achieves the technical effect of decoupling the upper and lower layers of centralized firewall configuration management, improving the scalability of template-based services in firewall configuration management.
[0067] Optionally, based on the target association relationship, multiple second configuration data associated with the first configuration data are determined, including: obtaining the target business associated with the template-type business corresponding to the first configuration data, wherein the target business is a sub-business of the template-type business corresponding to the first configuration data; obtaining the second configuration data of the target business; and determining multiple second configuration data associated with the first configuration data based on the second configuration data of the target business and the target association relationship.
[0068] In this embodiment, the target engine can consider scenarios where template-based business logic (i.e., template-like business logic) references other template-based business logic. During ssuco conversion, it provides ssucoRef to identify the references between template-based business logic. During deployment, Figure 3 This is a schematic diagram illustrating an optional delivery of services involving service cascading according to an embodiment of the present invention, such as... Figure 3 As shown, the engine recursively calls other services referenced by the template service to find all private configurations generated from the sub-service (corresponding to the target service mentioned above) to itself. The second configuration data of the template service and the second configuration data of the target service can be all private configuration data (corresponding to the second configuration mentioned above) associated with the first configuration data of the template service. Then, all the obtained private configurations can be distributed to the target device corresponding to each private configuration, achieving the technical effect of ensuring the comprehensiveness of the device's private configuration data.
[0069] Optionally, based on multiple second configuration data, device configuration is performed on multiple target devices through the capability layer, including: obtaining third configuration data of template-type services associated with the first configuration data, wherein the third configuration data is multiple second configuration data from historical time; comparing the multiple second configuration data with the third configuration data to obtain a comparison result; and configuring the multiple target devices based on the comparison result and the reference relationship between the multiple second configuration data.
[0070] In this embodiment, the engine itself can store the association between the incoming business configuration and the generated private configuration, as well as the association between the business configuration and the device. This information allows the engine to compare which configurations will be added to the capability layer, which capability layer configurations will be modified, and which capability layer configurations will be deleted when it receives multiple second configuration data converted by Ssuco. The engine can use a general sorting algorithm to ensure that adding or deleting configurations will not result in errors due to reference relationships. The engine calls the capability layer's CRUD and distribution interfaces, as long as the capability layer methods conform to the naming conventions. The engine can use a complete state machine process to ensure that when calling capability layer methods, regardless of whether it is creation / update / deletion, success / failure, the process will end correctly, and the engine will record the results and corresponding associations.
[0071] The template business props (first configuration data) input to the target engine are transformed into a capability layer data structure associated with device information via ssucco (target transformation strategy). The previously generated private configuration information for this business, stored in the engine, is retrieved, differences are compared, and comparison results are obtained to determine which configurations will be added to the capability layer, which will be modified, and which will be deleted. Then, based on the reference relationships of multiple second configuration data sets, device configurations are performed on multiple target devices.
[0072] Optionally, based on the comparison results and the reference relationships between multiple second configuration data, device configuration is performed on multiple target devices, including: based on the comparison results, determining the newly added configuration data among the multiple second configuration data, and sending the newly added configuration data to the target devices associated with the newly added configuration data according to the ascending order of the generation order of the newly added configuration data; based on the comparison results, determining the reduced configuration data among the multiple second configuration data, and deleting the configuration associated with the reduced configuration data in the target devices associated with the reduced configuration data according to the descending order of the generation order of the reduced configuration data; based on the comparison results, determining the modified configuration data among the multiple second configuration data, calling the preset editing method of the capability layer, and using the preset editing method to modify the configuration of each target device associated with the modified configuration data.
[0073] In this embodiment, by calling methods for private configurations in the capability layer, the capability layer can follow a common naming convention. Therefore, the engine only needs to know the private configuration type converted by ssuco to find and call the corresponding method for the private configuration in the capability layer based on the configuration type. When the engine receives multiple second configuration data converted by ssuco, it can compare which configurations will be added to the capability layer, which capability layer configurations will be modified, and which capability layer configurations will be deleted.
[0074] For example: Figure 4 This is a schematic diagram of an optional engine processing flow according to an embodiment of the present invention, such as... Figure 4 As shown, the service's props (first configuration data) is converted into a capability layer data structure associated with device information via ssucco (target conversion strategy). The private configuration information previously generated by the service stored in the engine is retrieved, and the differences are compared. Based on the comparison results, it is determined which configurations will be added to the capability layer, which capability layer configurations will be modified, and which capability layer configurations will be deleted.
[0075] If it is newly added configuration data, the atomic configuration type of the capability layer can be added by reflection according to the reference relationship of the newly added configuration data (ascending order) (corresponding to the ascending order of the above generation order). The state machine is entered to realize the state change through the sending time, and the newly added configuration data is added in the target device associated with the newly added configuration data.
[0076] If the reduced configuration data is to be deleted, the atomic configuration type deletion method of the capability layer can be called by reflection according to the reference relationship of the reduced configuration data (in reverse order) (corresponding to the reverse order of the above generation order). The state machine is entered to realize the state change by sending time, and the reduced configuration data is deleted in the target device associated with the reduced configuration data.
[0077] If the modified configuration data is edited, the capability layer atomic configuration type editing method (corresponding to the preset editing method mentioned above) can be called by reflection according to the modified configuration data. The state machine is entered and the state is changed by sending time. The modified configuration data is then modified in the target device associated with the modified configuration data.
[0078] In this embodiment, state transitions can also be achieved through a state machine. The engine implements a state machine process, starting with adding / deleting / editing / issuing private configurations of the capability layer. It will send events based on the success or failure of each step to transition to the next state until the end.
[0079] Figure 5 This is a schematic diagram of the state machine transition of an optional additional configuration according to an embodiment of the present invention, such as... Figure 5As shown, when adding a new configuration, the capability layer's add method is called. If the addition is successful, a success event can be sent, the engine layer data can be updated, the log can be recorded, an end event can be sent, and the state machine can be terminated. If the addition fails, a failure event can be sent, the engine layer data can be updated, the failure log can be recorded, an end event can be sent, and the state machine can be terminated.
[0080] Figure 6 This is a schematic diagram of the state machine transition for an optional update configuration according to an embodiment of the present invention, such as... Figure 6 As shown, when updating (or modifying) the configuration, the engine can send an update to the private configuration, call the new method in the capability layer during the update, and if the update fails, it can send an update failure event, update the engine layer record, log the failure, send an end event, and end the state machine. If the update succeeds, it can send an update success event, update the engine layer data, log the data, send an end event, and end the state machine.
[0081] Figure 7 This is a schematic diagram of the state machine transition for an optional deletion configuration according to an embodiment of the present invention, as shown below. Figure 7 As shown, when deleting a configuration, the capability layer's delete configuration method is called. If deletion fails, a deletion failure event can be sent, the engine layer data can be updated, a failure log can be recorded, and then an end event can be sent to terminate the state machine. If deletion succeeds, a deletion success event can be sent, the engine layer data can be updated, a log can be recorded, and an end event can be sent to terminate the state machine.
[0082] Optionally, the device configuration method includes: establishing a directed acyclic graph of multiple target configuration data based on the reference relationships between multiple target configuration data, wherein the target configuration data includes: newly added configuration data or reduced configuration data; and obtaining the generation order of multiple target configuration data through a graph algorithm based on the directed acyclic graph.
[0083] In this embodiment, graph algorithms can be used to determine the order of configuration references (corresponding to the generation order described above). When a service contains private configurations involving references, the order of creation (or addition) and deletion at the capability layer must be guaranteed.
[0084] Figure 8 This is a schematic diagram of an optional Kahn (topological sorting) algorithm according to an embodiment of the present invention, as shown below. Figure 8 As shown, assuming configuration C references configuration B, and configuration B, and C references configuration A, then when private configurations are generated at the capability layer, it must be ensured that A is generated first, followed by B, and C last. Similarly, when deleting configurations, if such reference relationships exist, configuration C can be deleted first, then configuration B, and finally configuration A. The engine can use a graph algorithm to ensure the order when reference relationships exist. The algorithm logic is mainly as follows:
[0085] Step 1. Record the in-degree of each point.
[0086] Step 2. Select a vertex from the DAG graph that has no predecessors (i.e., has an in-degree of 0) and output it.
[0087] Step 3. Remove the vertex and all directed edges originating from it from the DAG graph.
[0088] Step 4. Repeat steps 2 and 3 until the current DAG graph is empty or there are no vertices without predecessors in the current graph.
[0089] By using graph algorithms, the generation order of (A, B, C) configurations is generated, and then the capability layer is called sequentially to create the configurations. Deletion can be done simply by reversing the order, thus achieving the technical effect of ensuring the reliability of device configuration.
[0090] Optionally, before configuring multiple target devices through the capability layer based on multiple second configuration data, a distributed lock is established for each target device; after configuring multiple target devices through the capability layer based on multiple second configuration data, the distributed lock of each target device is released.
[0091] In this embodiment, the engine can use Redis distributed locks to prevent concurrency issues caused by multiple services issuing commands to a single device. Figure 9 This is a schematic diagram of an optional distributed lock according to an embodiment of the present invention, such as... Figure 9 As shown, the engine can request a distributed lock when generating a private configuration for a single device (corresponding to the single target device mentioned above), then perform changes and operations on the private configuration for that device, and release the distributed lock after the operation is completed. This prevents other services from simultaneously modifying the private configuration of the same device, causing configuration errors, and achieves the technical effect of ensuring the reliability of device configuration for a single device.
[0092] Through this embodiment, the engine can basically handle all complex template services. For example, it can issue a common and complex configuration-policy template that can reference address book templates, schedule templates, service book templates, and other business templates. Only its own ssuco needs to be defined—that is, the conversion logic from the business layer to the capability layer—and the engine will automatically convert it into a private configuration on the capability layer, automatically adding, editing, and deleting capability layer policies. Simultaneously, during the issuance process, the engine will find the private configurations generated from other templates it references to achieve configuration issuance to relevant devices.
[0093] Meanwhile, this embodiment decouples the main user-facing template services from the single-device configuration firewall development, allowing developers to focus on one direction instead of mixing up the logic. More importantly, it implements a complete set of universal processing logic, reducing redundancy by requiring the implementation of corresponding logic for each service. This significantly improves development efficiency. Example 2
[0094] Embodiment 2 of this application provides an optional device configuration apparatus applied to a target engine, wherein each implementation unit in the device configuration apparatus corresponds to each implementation step in Embodiment 1.
[0095] Figure 10 This is a schematic diagram of an optional device configuration apparatus according to an embodiment of the present invention, such as... Figure 10 As shown, the device configuration apparatus includes: a receiving module 11, a calling module 12, a sending module 13, and a configuration module 14.
[0096] Specifically, the receiving module 11 is used to receive the first configuration data sent by the business layer, wherein the business layer is a user-oriented device configuration layer that centrally manages multiple target devices, and the first configuration data is generated by the template-type business initiated by the business layer.
[0097] Module 12 is invoked to call the target conversion strategy to convert the first configuration data and obtain multiple second configuration data. The target conversion strategy is used to convert the data structure of the configuration data of the business layer into the data structure of the capability layer. The second configuration data includes at least: configuration data for configuring a single target device. The capability layer is used for configuring the target device.
[0098] Sending module 13 is used to call the data sending interface associated with multiple second configuration data to send the multiple second configuration data to the capability layer;
[0099] Configuration module 14 is used to configure multiple target devices through the capability layer based on multiple second configuration data.
[0100] In the device configuration apparatus provided in Embodiment 2 of this application, the receiving module 11 can receive first configuration data sent by the service layer. The service layer is a user-oriented device configuration layer that centrally manages multiple target devices. The first configuration data is generated by a template-based service initiated by the service layer. The calling module 12 calls a target conversion strategy to convert the first configuration data into multiple second configuration data sets. The target conversion strategy converts the data structure of the service layer's configuration data into the data structure of the capability layer. The second configuration data sets include at least configuration data for configuring a single target device. The capability layer is used to configure the target devices. The sending module 13 calls a data sending interface associated with the multiple second configuration data sets to send the multiple second configuration data sets to the capability layer. The configuration module 14 configures the multiple target devices based on the multiple second configuration data sets through the capability layer. This solves the technical problem in related technologies where the business logic of the user interface and the data structure of firewall device configuration management differ significantly, resulting in poor scalability of the business configuration management for firewall devices. In this embodiment, the first configuration data of the business layer is converted into multiple second configuration data that can be sent to the target device for device configuration by the target engine. This avoids the situation where the business logic of the business layer and the processing logic for configuration management of firewall devices need to be defined as a set, thereby achieving the technical effect of improving the scalability and robustness of the management platform for centralized management of firewall devices.
[0101] Optionally, in the device configuration apparatus provided in Embodiment 2 of this application, the calling module 12 includes: an acquisition unit, used to acquire target association relationships in the target engine through a target conversion strategy, wherein the target association relationships include at least: the association relationship between configuration data of the business layer and configuration data of the capability layer for device configuration of the target device, and the association relationship between configuration data of the business layer and the target device; and a determination unit, used to determine multiple second configuration data associated with the first configuration data based on the target association relationships.
[0102] In this embodiment, the engine (i.e., the target engine) provides an abstract class called ssuco. Different services can inherit from and implement its abstract methods to implement their own ssuco, thereby enabling the conversion of props to the private configuration data structure of the capability layer. The engine can store the association between the incoming service configuration (corresponding to the configuration data of the aforementioned service layer) and the generated private configuration, as well as the association between the service configuration and the device. Based on the target association, multiple second configuration data associated with the first configuration data can be determined. Through the target conversion strategy, the data structure of the configuration data transmitted from the service layer is converted into multiple second configuration data. This facilitates the conversion of template-based services initiated by the service layer for batch configuration of multiple devices into the private configuration of the devices associated with the service. This achieves the technical effect of decoupling the upper and lower layers of centralized firewall configuration management, improving the scalability of template-based services in firewall configuration management.
[0103] Optionally, in the device configuration apparatus provided in Embodiment 2 of this application, the determining unit includes: a first acquisition submodule, used to acquire a target service associated with a template-type service corresponding to the first configuration data, wherein the target service is a sub-service of the template-type service corresponding to the first configuration data; a second acquisition submodule, used to acquire second configuration data of the target service; and a first determining submodule, used to determine multiple second configuration data associated with the first configuration data based on the second configuration data of the target service and the target association relationship.
[0104] In this embodiment, the target engine can consider scenarios where template-based business logic (i.e., template-class business logic) references other template-based business logic. During ssuco conversion, it provides ssucoRef to identify the references between template-based business logic. During deployment, Figure 3 This is a schematic diagram illustrating an optional delivery of services involving service cascading according to an embodiment of the present invention, such as... Figure 3 As shown, the engine recursively calls other services referenced by the template service to find all private configurations generated from the sub-service (corresponding to the target service mentioned above) to itself. The second configuration data of the template service and the second configuration data of the target service can be all private configurations associated with the first configuration data of the template service (corresponding to the second configuration data mentioned above). Then, all the obtained private configurations can be sent to the target device corresponding to each private configuration, achieving the technical effect of ensuring the comprehensiveness of the device's private configuration data.
[0105] Optionally, in the device configuration apparatus provided in Embodiment 2 of this application, the configuration module 14 includes: an acquisition unit, used to acquire third configuration data of template-type services associated with the first configuration data, wherein the third configuration data is multiple second configuration data from historical time; a comparison unit, used to compare the multiple second configuration data with the third configuration data to obtain a comparison result; and a configuration unit, used to configure multiple target devices based on the comparison result and the reference relationship between the multiple second configuration data.
[0106] In this embodiment, the engine itself can store the association between the incoming business configuration and the generated private configuration, as well as the association between the business configuration and the device. This information allows the engine to compare which configurations will be added to the capability layer, which capability layer configurations will be modified, and which capability layer configurations will be deleted when it receives multiple second configuration data converted by Ssuco. The engine can use a general sorting algorithm to ensure that adding or deleting configurations will not result in errors due to reference relationships. The engine calls the capability layer's CRUD and distribution interfaces, as long as the capability layer methods conform to the naming conventions. The engine can use a complete state machine process to ensure that when calling capability layer methods, regardless of whether it is creation / update / deletion, success / failure, the process will end correctly, and the engine will record the results and corresponding associations.
[0107] The template business props (first configuration data) input to the target engine are transformed into a capability layer data structure associated with device information via ssucco (target transformation strategy). The previously generated private configuration information for this business, stored in the engine, is retrieved, differences are compared, and comparison results are obtained to determine which configurations will be added to the capability layer, which will be modified, and which will be deleted. Then, based on the reference relationships of multiple second configuration data sets, device configurations are performed on multiple target devices.
[0108] Optionally, in the device configuration apparatus provided in Embodiment 2 of this application, the configuration unit includes: a processing submodule, configured to determine new configuration data among multiple second configuration data based on comparison results, and send the new configuration data to the target device associated with the new configuration data according to the ascending order of the generation order of the new configuration data; a second determining submodule, configured to determine reduced configuration data among multiple second configuration data based on comparison results, and delete the configuration associated with the reduced configuration data in the target device associated with the reduced configuration data according to the descending order of the generation order of the reduced configuration data; and a third determining submodule, configured to determine modified configuration data among multiple second configuration data based on comparison results, call a preset editing method of the capability layer, and modify the configuration of each target device associated with the modified configuration data using the preset editing method.
[0109] In this embodiment, the method for invoking the private configuration of the capability layer is invoked via reflection. The capability layer can follow a common naming type, so the engine only needs to know the private configuration type converted by ssuco to find and call the corresponding method of the private configuration in the capability layer based on the configuration type. When the engine receives multiple second configuration data converted by ssuco, it can compare which configurations will be added to the capability layer, which capability layer configurations will be modified, and which capability layer configurations will be deleted.
[0110] For example: Figure 4 This is a schematic diagram of an optional engine processing flow according to an embodiment of the present invention, such as... Figure 4 As shown, the service's props (first configuration data) is converted into a capability layer data structure associated with device information via ssucco (target conversion strategy). The private configuration information previously generated by the service stored in the engine is retrieved, and the differences are compared. Based on the comparison results, it is determined which configurations will be added to the capability layer, which capability layer configurations will be modified, and which capability layer configurations will be deleted.
[0111] If it is newly added configuration data, the atomic configuration type of the capability layer can be added by reflection according to the reference relationship of the newly added configuration data (ascending order) (corresponding to the ascending order of the above generation order). The state machine is entered to realize the state change through the sending time, and the newly added configuration data is added in the target device associated with the newly added configuration data.
[0112] If the reduced configuration data is to be deleted, the atomic configuration type deletion method of the capability layer can be called by reflection according to the reference relationship of the reduced configuration data (in reverse order) (corresponding to the reverse order of the above generation order). The state machine is entered to realize the state change by sending time, and the reduced configuration data is deleted in the target device associated with the reduced configuration data.
[0113] If the modified configuration data is edited, the capability layer atomic configuration type editing method (corresponding to the preset editing method mentioned above) can be called by reflection according to the modified configuration data. The state machine is entered and the state is changed by sending time. The modified configuration data is then modified in the target device associated with the modified configuration data.
[0114] In this embodiment, state transitions can also be achieved through a state machine. The engine can implement a state machine process, starting with adding / deleting / editing / issuing private configurations of the capability layer. It will send events based on the success or failure of each step and transition to the next state until the end.
[0115] Figure 5 This is a schematic diagram of the state machine transition of an optional additional configuration according to an embodiment of the present invention, such as... Figure 5As shown, when adding a new configuration, the capability layer's add method is called. If the addition is successful, a success event can be sent, the engine layer data can be updated, the log can be recorded, an end event can be sent, and the state machine can be terminated. If the addition fails, a failure event can be sent, the engine layer data can be updated, the failure log can be recorded, an end event can be sent, and the state machine can be terminated.
[0116] Figure 6 This is a schematic diagram of the state machine transition for an optional update configuration according to an embodiment of the present invention, such as... Figure 6 As shown, when updating (or modifying) the configuration, the engine can send an update to the private configuration, call the new method in the capability layer during the update, and if the update fails, it can send an update failure event, update the engine layer record, log the failure, send an end event, and end the state machine. If the update succeeds, it can send an update success event, update the engine layer data, log the data, send an end event, and end the state machine.
[0117] Figure 7 This is a schematic diagram of the state machine transition for an optional deletion configuration according to an embodiment of the present invention, as shown below. Figure 7 As shown, when deleting a configuration, the capability layer's delete configuration method is called. If deletion fails, a deletion failure event can be sent, the engine layer data can be updated, a failure log can be recorded, and then an end event can be sent to terminate the state machine. If deletion succeeds, a deletion success event can be sent, the engine layer data can be updated, a log can be recorded, and an end event can be sent to terminate the state machine.
[0118] Optionally, in the device configuration apparatus provided in Embodiment 2 of this application, the configuration unit further includes: a building submodule, used to build a directed acyclic graph of multiple target configuration data based on the reference relationship between multiple target configuration data, wherein the target configuration data includes: added configuration data or reduced configuration data; and a calculation submodule, used to obtain the generation order of multiple target configuration data based on the directed acyclic graph and through a graph algorithm.
[0119] In this embodiment, graph algorithms can be used to determine the order of configuration references (corresponding to the generation order described above). When a service contains private configurations involving references, the order of creation (or addition) and deletion at the capability layer must be guaranteed.
[0120] Figure 8 This is a schematic diagram of an optional Kahn algorithm according to an embodiment of the present invention, such as... Figure 8As shown, assuming configuration C references configuration B, and configuration B, and C references configuration A, then when private configurations are generated at the capability layer, it must be ensured that A is generated first, followed by B, and C last. Similarly, when deleting configurations, if such reference relationships exist, configuration C can be deleted first, then configuration B, and finally configuration A. The engine can use a graph algorithm to ensure the order when reference relationships exist. The algorithm logic is mainly as follows:
[0121] Step 1. Record the in-degree of each point.
[0122] Step 2. Select a vertex from the DAG graph that has no predecessors (i.e., has an in-degree of 0) and output it.
[0123] Step 3. Remove the vertex and all directed edges originating from it from the DAG graph.
[0124] Step 4. Repeat steps 2 and 3 until the current DAG graph is empty or there are no vertices without predecessors in the current graph.
[0125] By using graph algorithms, the generation order of (A, B, C) configurations is generated, and then the capability layer is called sequentially to create the configurations. Deletion can be done simply by reversing the order, thus achieving the technical effect of ensuring the reliability of device configuration.
[0126] Optionally, in the device configuration apparatus provided in Embodiment 2 of this application, the device configuration apparatus further includes: an establishment module, used to establish a distributed lock for each target device before configuring multiple target devices through the capability layer based on multiple second configuration data; and a release module, used to release the distributed lock of each target device after configuring multiple target devices through the capability layer based on multiple second configuration data.
[0127] In this embodiment, the engine can use Redis distributed locks to prevent concurrency issues caused by multiple services issuing commands to a single device. Figure 9 This is a schematic diagram of an optional distributed lock according to an embodiment of the present invention, such as... Figure 9 As shown, the engine can request a distributed lock when generating a private configuration for a single device (corresponding to the single target device mentioned above), then perform changes and operations on the private configuration for that device, and release the distributed lock after the operation is completed. This prevents other services from simultaneously modifying the private configuration of the same device, causing configuration errors, and achieves the technical effect of ensuring the reliability of device configuration for a single device.
[0128] The aforementioned device configuration apparatus may also include a processor and a memory. The aforementioned receiving module 11, calling module 12, sending module 13, configuration module 14, etc., are all stored in the memory as program units, and the processor executes the aforementioned program units stored in the memory to realize the corresponding functions.
[0129] The aforementioned processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured. By adjusting kernel parameters, the target engine can convert the first configuration data from the business layer into multiple second configuration data sets that can be distributed to the target device for device configuration. This avoids the need for the business logic of the business layer and the processing logic for configuring and managing firewall devices to be defined as a single set, thereby improving the scalability and robustness of the centralized management platform for firewall devices.
[0130] The aforementioned memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0131] According to another aspect of the present invention, an electronic device is also provided, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the device configuration method of any of the above-mentioned methods by executing the executable instructions.
[0132] According to another aspect of the present invention, a computer-readable storage medium is also provided, which stores a computer program, wherein the computer program controls the device where the computer-readable storage medium is located to execute any of the above-described device configuration methods when it is running.
[0133] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0134] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0135] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0136] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0137] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0138] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0139] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A device configuration method, characterized in that, Applied to the target engine, including: The system receives first configuration data sent by the service layer, wherein the service layer is a user-oriented device configuration layer that centrally manages multiple target devices, the first configuration data is generated by the service layer initiating a template-type service, and the target device is a firewall device. The first configuration data is transformed by calling a target transformation strategy to obtain multiple second configuration data. The target transformation strategy is used to transform the data structure of the configuration data of the business layer into the data structure of the capability layer. The second configuration data includes at least: configuration data for configuring a single target device. The capability layer is used to configure the target device. Invoke the data sending interface associated with the multiple second configuration data to send the multiple second configuration data to the capability layer; Based on multiple sets of the second configuration data, the capability layer is used to configure multiple target devices. The first configuration data is transformed by invoking a target transformation strategy to obtain multiple second configuration data, including: obtaining target association relationships in the target engine through the target transformation strategy, wherein the target association relationships include at least: the association relationship between the configuration data of the business layer and the configuration data of the capability layer for device configuration of the target device, and the association relationship between the configuration data of the business layer and the target device; and determining multiple second configuration data associated with the first configuration data based on the target association relationships. The step of determining multiple sets of second configuration data associated with the first configuration data based on the target association relationship includes: obtaining a target service associated with a template-type service corresponding to the first configuration data, wherein the target service is a sub-service of the template-type service corresponding to the first configuration data; obtaining second configuration data of the target service; and determining multiple sets of second configuration data associated with the first configuration data based on the second configuration data of the target service and the target association relationship.
2. The equipment configuration method according to claim 1, characterized in that, Based on multiple sets of the second configuration data, the capability layer configures multiple target devices, including: Obtain the third configuration data of the template-type business associated with the first configuration data, wherein the third configuration data is multiple second configuration data from historical time periods; Compare multiple sets of the second configuration data with the third configuration data to obtain a comparison result; Based on the comparison results and the reference relationships between multiple sets of the second configuration data, device configuration is performed on multiple target devices.
3. The equipment configuration method according to claim 2, characterized in that, Based on the comparison results and the reference relationships between multiple sets of second configuration data, device configuration is performed on multiple target devices, including: Based on the comparison results, newly added configuration data is determined among multiple second configuration data, and the newly added configuration data is sent to the target device associated with the newly added configuration data according to the ascending order of the generation order of the newly added configuration data. Based on the comparison results, reduced configuration data is determined from multiple sets of second configuration data, and the configuration associated with the reduced configuration data in the target device associated with the reduced configuration data is deleted according to the reverse order of the generation order of the reduced configuration data. Based on the comparison results, modified configuration data is determined from multiple sets of the second configuration data. The preset editing method of the capability layer is invoked, and the configuration of the target device associated with each modified configuration data is modified using the preset editing method.
4. The equipment configuration method according to claim 3, characterized in that, The method further includes: Based on the reference relationships between multiple target configuration data, a directed acyclic graph of the multiple target configuration data is established, wherein the target configuration data includes: the newly added configuration data or the reduced configuration data; Based on the directed acyclic graph, the generation order of the multiple target configuration data is obtained through graph algorithms.
5. The equipment configuration method according to claim 1, characterized in that, Before configuring multiple target devices through the capability layer based on multiple sets of the second configuration data, a distributed lock is established for each target device; After configuring multiple target devices through the capability layer based on multiple sets of the second configuration data, the distributed lock of each target device is released.
6. A device configuration apparatus, characterized in that, Applied to the target engine, including: The receiving module is used to receive first configuration data sent by the service layer, wherein the service layer is a user-oriented device configuration layer that centrally manages multiple target devices, the first configuration data is generated by the service layer initiating a template-type service, and the target device is a firewall device; The calling module is used to call the target conversion strategy to convert the first configuration data to obtain multiple second configuration data. The target conversion strategy is used to convert the data structure of the configuration data of the business layer into the data structure of the capability layer. The second configuration data includes at least: configuration data for configuring a single target device. The capability layer is used to configure the target device. The sending module is used to call the data sending interface associated with multiple second configuration data to send the multiple second configuration data to the capability layer; The configuration module is used to configure multiple target devices through the capability layer based on multiple sets of the second configuration data. The first configuration data is transformed by invoking a target transformation strategy to obtain multiple second configuration data, including: obtaining target association relationships in the target engine through the target transformation strategy, wherein the target association relationships include at least: the association relationship between the configuration data of the business layer and the configuration data of the capability layer for device configuration of the target device, and the association relationship between the configuration data of the business layer and the target device; and determining multiple second configuration data associated with the first configuration data based on the target association relationships. Based on the target association relationship, determining a plurality of second configuration data associated with the first configuration data includes: obtaining a target service associated with a template-type service corresponding to the first configuration data, wherein the target service is a sub-service of the template-type service corresponding to the first configuration data; obtaining second configuration data of the target service; and determining a plurality of second configuration data associated with the first configuration data based on the second configuration data of the target service and the target association relationship.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the device configuration method according to any one of claims 1 to 5.
8. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the device configuration method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Security policy configuration method and device, equipment and storage medium
CN113285906A
Network automatic configuration system
CN113315654A
Configuration template generation method, network element configuration method and system, and storage medium
CN115396916A