Adaptive configuration method and device, and storage medium

By acquiring the initial disordered configuration of network devices and determining their relational model, the configuration is automatically adjusted to an ordered configuration, solving the problem of multiple modifications caused by users' lack of understanding of configuration constraints, and achieving an efficient configuration process.

CN116418668BActive Publication Date: 2026-03-31ZTE CORP
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In existing technologies, users often need to make multiple modifications when configuring network devices because they are unaware of the device configuration constraints and their order of operations, resulting in low configuration efficiency.

Method used

By obtaining the initial unordered configuration, determining its corresponding relational model, and adjusting it into an ordered configuration based on this model, multiple modification operations caused by users' lack of understanding of configuration constraints are avoided.

Benefits of technology

It improves configuration efficiency, reduces the number of modifications users need to make during the configuration process, and enhances the convenience and efficiency of operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116418668B_ABST
    Figure CN116418668B_ABST
Patent Text Reader

Abstract

The embodiment of the present application relates to the technical field of network configuration, and discloses a self-adaptive configuration method, comprising: obtaining an initial unordered configuration; determining a relationship model corresponding to the initial unordered configuration according to the initial unordered configuration; and adjusting the initial unordered configuration into an ordered configuration according to the relationship model.The self-adaptive configuration method, device and storage medium in the embodiment can avoid multiple modifications in the configuration process and improve the configuration efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network configuration technology, and in particular to an adaptive configuration method, apparatus and storage medium. Background Technology

[0002] With the rapid development of information technology, network devices are becoming increasingly powerful. This increased power brings with it greater configuration complexity. Simultaneously, the constraints between configurations on the devices are becoming more intricate, increasing the difficulty for users to operate them. Currently, the common practice is for users to view the device's configuration and then issue configurations one by one to apply them. Alternatively, configurations are issued in batches, and if the device reports an error, the user must modify the configuration order based on the error message.

[0003] Both of these approaches require users to understand the device's configuration constraints. If users only know the final set of configurations that take effect but are unaware of the order of configurations, they may need to make multiple modifications to achieve the desired configuration effect, resulting in low configuration efficiency. Summary of the Invention

[0004] The main objective of this application is to provide an adaptive configuration method, apparatus, and storage medium that can avoid multiple modifications during the configuration process and improve configuration efficiency.

[0005] To achieve the above objectives, embodiments of this application provide an adaptive configuration method, comprising: obtaining an initial unordered configuration; determining a relational model corresponding to the initial unordered configuration based on the initial unordered configuration; and adjusting the initial unordered configuration into an ordered configuration based on the relational model.

[0006] To achieve the above objectives, embodiments of this application also provide an adaptive configuration device, characterized in that it includes:

[0007] At least one processor; and,

[0008] A memory communicatively connected to the at least one processor; wherein,

[0009] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the adaptive configuration method described above.

[0010] To achieve the above objectives, embodiments of this application also provide a computer-readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the above-described adaptive configuration method.

[0011] This application proposes an adaptive configuration method. In this embodiment, even if the user is unaware of the device's configuration constraints, the initial unordered configuration can be directly adjusted to an ordered configuration based on the relationship model corresponding to the initial unordered configuration. Therefore, it avoids multiple modification operations caused by the user's lack of understanding of the device's configuration constraints and the order of configurations, thus greatly improving configuration efficiency. Attached Figure Description

[0012] One or more embodiments are illustrated by way of example with reference to the accompanying drawings, and these illustrative descriptions do not constitute a limitation on the embodiments.

[0013] Figure 1 This is a flowchart illustrating the adaptive configuration method according to an embodiment of the present invention;

[0014] Figure 2 This is a schematic diagram illustrating the logical relationships between configurations in an embodiment of the present invention;

[0015] Figure 3 This is an example diagram of the initial unordered configuration in an embodiment of the present invention;

[0016] Figure 4 Is with Figure 3 The diagram shows the relational model corresponding to the initial unordered configuration.

[0017] Figure 5 Is with Figure 3 The initial unordered configuration shown corresponds to the ordered configuration.

[0018] Figure 6 This is a schematic diagram of the framework of the adaptive configuration method according to an embodiment of the present invention;

[0019] Figure 7 This is a schematic diagram of the adaptive configuration device according to an embodiment of the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the various embodiments of this application will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details have been provided in the various embodiments of this application to help readers better understand this application. However, the technical solutions claimed in this application can be implemented even without these technical details and various changes and modifications based on the following embodiments. The division of the various embodiments below is for the convenience of description and should not constitute any limitation on the specific implementation of this application. The various embodiments can be combined with and referenced by each other without contradiction.

[0021] This application provides an adaptive configuration method. The core of this implementation includes: obtaining an initial unordered configuration; determining a relational model corresponding to the initial unordered configuration; and adjusting the initial unordered configuration into an ordered configuration based on the relational model. In this embodiment, even if the user is unaware of the device's configuration constraints, they can directly adjust the initial unordered configuration into an ordered configuration based on the relational model corresponding to the initial unordered configuration. Therefore, it avoids multiple modification operations caused by the user's lack of understanding of the device's configuration constraints and the order of configurations, thus greatly improving configuration efficiency.

[0022] The flowchart of the adaptive configuration method in this embodiment is shown below. Figure 1 As shown, it includes:

[0023] Step S11: Obtain the initial unordered configuration.

[0024] Specifically, this initial disordered configuration can be input by the user or generated automatically by the computer system.

[0025] In some examples, before determining the relational model corresponding to the initial unordered configuration, the method further includes: performing syntax validation on the initial unordered configuration. In this embodiment, after step S11 and before step S12, a basic syntax validation can be performed on the obtained initial unordered configuration. The basic syntax validation is to detect some basic syntax errors in advance, promptly prompt the user with error information, and reduce system overhead.

[0026] Step S12: Determine the relationship model corresponding to the initial unordered configuration based on the initial unordered configuration and the pre-set configuration relationship template of a single configuration.

[0027] Optionally, the relationship model corresponding to the initial unordered configuration is determined based on the initial unordered configuration and the configuration relationship template of a pre-set single configuration, including: determining multiple configurations in this configuration based on the initial unordered configuration; determining the configuration relationship between each configuration and other configurations in the multiple configurations based on the configuration relationship template of a pre-set single configuration; and determining the relationship model corresponding to the initial unordered configuration based on the configuration relationship.

[0028] Specifically, such as Figure 2As shown, many configurations supported on the device do not exist independently, but rather are related in a specific order. For example, the IP address configuration under an interface can only be operated on if the interface configuration exists. In this embodiment, the configuration that the configuration directly depends on is defined as the resource-providing configuration. For the resource-providing configuration, the current configuration is the configuration that occupies that resource. Relying on the same resource for configuration will lead to resource contention. Contention for resources in order will create indirect dependencies, and limited contention and the inability to share resources will create mutual exclusion. It can be seen that the logical relationships between configurations roughly include: indirect dependency logic and mutual exclusion logic. Indirect dependency logic means that the current configuration operation requires its indirectly dependent configuration to exist, and mutual exclusion logic means that the current configuration operation requires its mutually exclusive configuration to not exist.

[0029] Based on the logical relationships between the above configurations, the configuration relationship template should at least include: the name of the current configuration, the configurations that the current configuration depends on, and the configurations that are mutually exclusive with the current configuration. Thus, the relationship between each current configuration and other configurations can be determined from the configuration relationship module for each configuration. During the configuration process, before configuring the current configuration, the configurations that the current configuration depends on must be configured first; and before configuring the current configuration, the configurations that are mutually exclusive with the current configuration cannot be configured. Optionally, the configuration relationship template may also include configurations that provide resources to the current configuration.

[0030] It's worth noting that user operation configurations are divided into forward configurations and reverse configurations. Forward configurations correspond to creation and modification operations (set); reverse configurations correspond to deletion operations (delete). In the relational model, configurations providing resources and configurations with indirect dependencies correspond to forward configurations of user operations, while mutually exclusive configurations correspond to reverse configurations. Whether a configuration is forward or reverse can be indicated in its name; for example, CON1_create represents a forward configuration (create).

[0031] Specifically, in this embodiment, a configuration relationship template is pre-established by defining the current configuration, the configuration that provides resources to the current configuration, the configuration that the current configuration depends on, and the configuration that is mutually exclusive with the current configuration. The configuration relationship template can be defined using YML or Yang language.

[0032]

[0033] Here, object represents the current configuration, resource represents the configuration that provides resources to the current configuration, depend represents the configuration that the current configuration depends on, and mutex represents the configuration that is mutually exclusive with the current configuration.

[0034] In this embodiment, multiple configurations in the current configuration are determined based on the initial unordered configuration, and the configuration relationship of each configuration in the multiple configurations is determined based on the configuration relationship template, thereby obtaining the relationship model of the initial unordered configuration.

[0035] like Figure 3 As shown below, the working principle of an adaptive user configuration system will be described in detail through an example with both forward and reverse configuration. Figure 3 The initial unordered configuration shown includes multiple configurations: CON1_create, CON2_create, CON3_delete, CON4_create, CON5_create, CON6_create, CON7_delete, and CON8_delete. Among them, the operations CON1_create, CON2_create, CON4_create, CON5_create, and CON6_create are forward configuration create operations, while the operations CON3_delete, CON7_delete, and CON8_delete are reverse configuration delete operations.

[0036] At this point, based on the pre-set configuration relationship template for a single configuration, the configuration relationship between each configuration and other configurations can be determined. Specifically, the configuration relationship of configuration CON1_create is as follows:

[0037] config1_ref_model:

[0038] object:

[0039] name:CON1_create

[0040] Thus, the relational model corresponding to the initial unordered configuration obtained based on the configuration relationships of each of the above configurations is shown below:

[0041]

[0042]

[0043]

[0044] Step S13: Generate a relational model diagram based on the relational model.

[0045] Specifically, as mentioned above Figure 3 Taking the initial configuration as an example, the relational model diagram obtained by the adaptive algorithm based on the relational model corresponding to the initial unordered configuration is shown below. Figure 4 As shown, the arrows indicate the degree direction, and the out-degree direction is the direction from the source device in the current configuration to the configuration that the current configuration depends on.

[0046] In this embodiment, all out-degree directions between multiple configurations can be obtained based on the above relational model, thus obtaining the relational model graph.

[0047] The following example illustrates how to determine the out-degree direction: In the relational model corresponding to the initial unordered configuration above, CON2_create is the forward configuration, and the configurations related to CON2_create are CON1_create and CON3_create. Thus, CON2_create includes two out-degree directions: CON2_create points to CON1_create, and CON2_create points to CON3_create.

[0048] In the relational model corresponding to the initial unordered configuration described above, CON7_delete is the reverse configuration, and the configurations related to CON7_delete are CON3_delete and CON8_delete. Therefore, there are two out-degree directions pointing to CON7_delete: CON3_create points to CON7_delete, and CON8_delete points to CON7_delete. Following this pattern, all out-degree directions between multiple configurations can be obtained from the above relational model, thus yielding the relational model graph.

[0049] Step S14: Traverse each configuration in the relational model graph to redetermine the configuration order of each configuration among all configurations.

[0050] Step S15: Adjust the initially unordered configurations into ordered configurations according to the configuration order of each configuration in all configurations.

[0051] Optionally, traversing each configuration in the relational model graph to redetermine the configuration order of each configuration among all configurations includes: starting from the configuration in the unordered configuration relation, traversing the configuration order of each configuration in the relational model graph according to the out-degree direction of the configuration, where the out-degree direction is: the direction from the source device in the current configuration to the configuration that the current configuration depends on; if the out-degree direction of the configuration is 0, then the configuration is recorded in the configuration order linked list; if the out-degree direction of the configuration is not 0, then continue to determine the out-degree direction of the configuration in each out-degree direction until the out-degree direction is 0.

[0052] Specifically, starting with the first configuration (C1) in the unordered configuration relationship, find one of its out-degree directions (C2) and mark the second configuration C2 as visited. If the out-degree of the current configuration is 0, add the current configuration to the ordered linked list and mark its state as visited. Starting with the second configuration C2, repeat step 1) until a configuration with an out-degree of 0 is found. After finding the configuration, add it to the ordered linked list and mark its state as visited.

[0053] Return to the previous configuration of the current configuration, and search for other configurations that have not been visited in the out-degree direction, and continue to visit them.

[0054] Repeat the above process until all configurations are added to the ordered linked list. At this point, the user-issued configurations are adjusted to be ordered configurations.

[0055] For example, the reordering process for the above example with forward and reverse configurations is as follows:

[0056] (1) Process the first configuration CON1_create issued by the user. Since CON1_create has an out-degree of 0 in the model relationship graph, it can be directly placed on the ordered linked list, and the status of CON1_create is marked as visited.

[0057] (2) Process the user-issued configuration CON2_create. CON2_create has an out-degree of 2 in the model relationship graph, and the corresponding configurations are CON1_create and CON3_delete. Among them, the status of CON1_create is already accessed, so CON3_delete is processed directly.

[0058] (3) CON3_delete has an out-degree of 2, corresponding to configurations CON7_delete and CON8_delete. Choose any configuration (CON8_delete) with an out-degree of 1, corresponding to configuration CON7_delete, which has an out-degree of 0. Place it on the ordered linked list and mark its status as visited. Return to the previous configuration CON8_delete, place it on the ordered linked list, and mark its status as visited. Return to the previous configuration CON3_delete, place it on the ordered linked list, and mark its status as visited. At this point, all out-degree directions of CON2_create have been processed, and CON2_create is placed on the ordered linked list, marked as visited.

[0059] (4) Process the user-issued configuration CON3_delete. If the status is found to be already accessed, no further processing is required.

[0060] (5) Process the user-issued configuration CON4_create, whose out-degree direction is 0. It can be directly placed on the ordered linked list and marked as already visited.

[0061] (6) Process the user-issued configuration CON5_create, whose out-degree direction is 2, corresponding to configurations CON1_create and CON6_create respectively. CON6_create has an out-degree of 1, corresponding to configuration CON1_create. CON1_create has been accessed, so add CON6_create to the ordered linked list and mark its status as accessed. Return to the previous configuration CON5_create. All out-degree directions have been processed, so add CON5_create to the ordered linked list and mark its status as accessed.

[0062] (7) Process the user-issued CON6_Create, CON7_Delete, and CON8_Delete. It is found that the statuses of CON6_Create, CON7_Delete, and CON8_Delete are all already accessed. The reordering is now complete.

[0063] The adjusted order is as follows Figure 5 As shown.

[0064] Optionally, this embodiment can support adjusting and modifying the configuration without the user's confirmation.

[0065] In some examples, the relational model corresponding to the initial unordered configuration is determined based on the initial unordered configuration, including: retrieving the relational model corresponding to the initial unordered configuration from the database, where the relational model corresponding to the initial unordered configuration is pre-stored.

[0066] like Figure 6 As shown, the database records the effective data already configured on the device, i.e., the correspondence between the initial unordered configuration and the relational model. Thus, when a user adjusts the configuration order of this initial unordered configuration, the corresponding relational model can be directly matched in the database, eliminating the need to regenerate the relational model and improving configuration speed. The initial unordered configuration generates the final ordered configuration message through database data, a directed graph of model relationships, and an adaptive reordering algorithm.

[0067] In this embodiment, configuration constraints are abstracted into a directed graph of model relationships. Then, the device or system adjusts the configuration order of user operations based on the initial unordered configuration, the directed graph of model relationships, and the data-compatible adaptive user configuration algorithm, ultimately achieving an adaptive user configuration effect.

[0068] The steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this patent.

[0069] This invention relates to an adaptive configuration device, such as... Figure 7 As shown, it includes at least one processor 301; and a memory 302 communicatively connected to at least one processor 301; wherein the memory 302 stores instructions executable by at least one processor 301, the instructions being executed by at least one processor 301 to enable at least one processor 301 to perform the above-described adaptive configuration method.

[0070] The memory 302 and processor 301 are connected via a bus, which can include any number of interconnecting buses and bridges. The bus connects various circuits of one or more processors 301 and memory 302 together. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by processor 301 is transmitted over a wireless medium via an antenna, which further receives data and transmits it to processor 301.

[0071] Processor 301 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces,

[0072] Voltage regulation, power management, and other control functions. The memory 302 can be used to store data used by the processor 301 during operation.

[0073] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described adaptive configuration method.

[0074] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0075] Those skilled in the art will understand that the above embodiments are specific embodiments for implementing the present invention, and in practical applications, various changes in form and detail may be made without departing from the spirit and scope of the present invention.

Claims

1. An adaptive configuration method, characterized by, The method comprises the following steps: acquiring an initial unordered configuration; determining a plurality of configurations in this configuration according to the initial unordered configuration; determining the configuration relationship between each configuration and other configurations in the plurality of configurations according to a preset configuration relationship template of a single configuration; determining a relationship model corresponding to the initial unordered configuration according to the configuration relationship; adjusting the initial unordered configuration into an ordered configuration according to the relationship model.

2. The adaptive configuration method of claim 1, wherein, The configuration relationship template comprises the name of a current configuration, a configuration relied on by the current configuration, and a configuration mutually exclusive with the current configuration.

3. The adaptive configuration method of claim 1, wherein, The step of adjusting the initial unordered configuration into an ordered configuration according to the relationship model comprises the following steps: generating a relationship model graph according to the relationship model; traversing each configuration in the relationship model graph to redetermine the configuration order of each configuration in all configurations; adjusting the initial unordered configuration into an ordered configuration according to the configuration order of each configuration in all configurations.

4. The adaptive configuration method of claim 3, wherein, The step of traversing each configuration in the relationship model graph to redetermine the configuration order of each configuration in all configurations comprises the following steps: starting from a configuration in the initial unordered configuration, traversing the configuration order of each configuration in the relationship model graph according to the out-degree direction of the configuration, wherein the out-degree direction is a direction in which a source device in a current configuration points to a configuration relied on by the current configuration; if the out-degree direction of the configuration is 0, recording the configuration on a configuration order linked list; if the out-degree direction of the configuration is not 0, continuing to determine the out-degree direction of each configuration in each out-degree direction until the out-degree direction is 0.

5. The adaptive configuration method of claim 1, wherein, The method further comprises the following steps: the relationship model corresponding to the initial unordered configuration is acquired from a database, and the database pre-stores the relationship model corresponding to the initial unordered configuration.

6. The self-adapting configuration method of claim 1, wherein, Before the step of determining a plurality of configurations in this configuration according to the initial unordered configuration, the method further comprises the following step: performing syntax verification on the initial unordered configuration.

7. An adaptive configuration apparatus characterized by comprising: The device comprises the following components: at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the adaptive configuration method according to any one of claims 1 to 6.

8. A computer readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to implement the adaptive configuration method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Network configuration method and device and storage medium

    CN111404755A