Network configuration method and device, computer storage medium and terminal
By loading multiple modules in the preset template of the large-scale test network, setting the editing format of configuration-related information, determining the execution order based on the module call relationship, and loading the configuration tools one by one to configure parameters, the network system configuration problem of the large-scale test network is solved, and efficient and secure network parameter configuration is achieved.
Patent Information
- Application Number
- CN202510934054.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-07
- Publication Date
- 2025-09-16
AI Technical Summary
The network system configuration of large-scale test networks faces difficulties in unified scheduling, parameter dependency sharing, configuration tool consistency, and authorization model difficulties in heterogeneous environments, resulting in inefficient configuration and security risks.
By loading multiple modules into a preset template and defining the editing format for configuration-related information, different types of configuration parameters can be transferred and shared between modules. The execution order is determined based on the calling relationships between modules, and configuration tools are loaded one by one to configure parameters, achieving compatibility with multiple types of network parameter configurations.
It realizes parameter configuration of large-scale networks, ensures the transmission and sharing of configuration parameters between modules, solves the problem of inconsistent configuration tools, and improves configuration efficiency and security.
Smart Images

Figure CN120658608A_ABST
Abstract
Description
Technical Field
[0001] This article relates to computer network technology, and in particular to a method, device, computer storage medium, and terminal for network configuration. Background Art
[0002] As the internet faces numerous challenges in security, performance, and scalability, research on the future internet is in full swing. Future internet test facilities serve as the experimental infrastructure supporting this research. Numerous studies have already been conducted to address the challenges of internet scalability, security, and performance. However, due to the vast scale of the internet, some new ideas are difficult to deploy on the existing network. Therefore, internet test facilities are required to comprehensively consider research from various directions, integrate these technologies into core equipment, and ultimately conduct large-scale trials of these technologies and equipment using large-scale test networks.
[0003] The network system configuration of a large-scale test network usually needs to rely on some configuration tools. Network system configuration can be divided into three types according to the different configuration methods: resource configuration, routing configuration, and system configuration. Among them, network resources are generally provided by the cloud platform and have cloud platform dependencies. Routing settings are either configured through the network controller or directly configured using commands in the router. System configuration is generally performed by automatic configuration software. How to uniformly schedule the three types of network system configurations of the above-mentioned large-scale test network is a current problem. Secondly, there will be parameter dependencies between the various configurations. For example, in resource configuration, the obtained IP address will be used to pass to the routing configuration and system configuration system. How to share resource parameters becomes a problem. Thirdly, there is the difference between descriptive and non-descriptive. For example, although Ansible is generally stateful, for state configuration, it is possible to check whether the state has been configured. However, for quantitative configuration, the command implementation needs to be adjusted. How to achieve consistency among the three configuration tools is also a problem. Finally, there are usually multiple subjects in the configuration, and the ownership is different. In the process of automatic configuration, some resources such as virtual The virtual machine is usually completely controlled by the configurator, and then there are some resources, such as VFR in the router, or when only some commands in the virtual machine are allowed, it is partially controlled by the configurator. In this case, some other resources need to belong to each other. Another authorization mode is in the case of heterogeneity. How to achieve distributed authorization, temporary authorization, etc. is an important issue; in addition, when directly configuring with commands in the router, super user permissions are usually required, so how to authorize safely is a big problem. If super user permissions are given to each experimenter, network mismatches are likely to occur, leading to big problems; a large-scale experiment often requires massive system configurations, and how to establish configuration snapshots of these massive systems to facilitate rapid reconstruction is a big problem.
[0004] In summary, how to realize the network system configuration of a large-scale test network has become a problem to be solved. Summary of the Invention
[0005] The present invention provides a method for network configuration, which is applied to a large-scale network and includes: Load two or more modules in a preset template, where the two or more modules are used to perform parameter configuration of a large-scale network. All modules edit configuration-related information according to the same preset format. The configuration-related information of each module includes the calling relationship between modules and the following configuration execution information: configuration tool and its loading address, configuration file path, and configuration parameters from other modules; Determine the execution order of module configuration based on the calling relationship between modules; According to the determined execution order, the network parameters are configured one by one according to the configuration execution information of the modules in the template until all modules have completed the parameter configuration, and the network parameter configuration is completed.
[0006] On the other hand, an embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned network configuration method is implemented.
[0007] On the other hand, an embodiment of the present application further provides a terminal, comprising: a memory and a processor, wherein the memory stores a computer program; wherein: The processor is configured to execute the computer program in the memory; When the computer program is executed by the processor, the network configuration method described above is implemented.
[0008] In another aspect, an embodiment of the present application further provides a network configuration device, which is applied to a large-scale network and includes: a module loading unit, a sequence determination unit, and a processing unit; wherein, The module loading unit is configured to load two or more modules in a preset template, wherein the two or more modules are used to execute parameter configuration of a large-scale network, and configuration-related information is edited in all modules according to the same preset format. The configuration-related information of each module includes the calling relationship between modules and the following configuration execution information: configuration tool and its loading address, configuration file path, and configuration parameters from other modules; Determine the order unit settings as follows: determine the execution order of module configurations based on the calling relationships between modules; The processing unit is configured to: configure network parameters one by one according to the configuration execution information of the modules in the template according to the determined execution order, until all modules have completed parameter configuration, thus completing the network parameter configuration.
[0009] In the embodiment of the present disclosure, for a large-scale network, two or more modules in a template perform network parameter configuration. By setting the editing format of configuration-related information, it is ensured that different types of configuration parameters can be transmitted and shared between modules. Different configuration tools can be loaded through the configuration execution information of the module, and different types of parameter configurations based on different configuration tools are realized, thereby avoiding the problem that the configuration tools are inconsistent and cannot be configured at the same time, and achieving compatibility of multiple types of network parameter configurations. The modules in the template determine the execution order of the module configuration according to the calling relationship between the modules. For each module, after the configuration tool is loaded according to the configuration tool and its loading address, the configuration tool accesses the configuration file and configuration parameters from other modules according to the configuration file path to realize parameter configuration. After completing the parameter configuration of all modules, the parameter configuration of the large-scale network is realized.
[0010] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present application. Other advantages of the present application can be realized and obtained by the solutions described in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The accompanying drawings are used to provide an understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0012] Figure 1 A flowchart of a method for network configuration according to an embodiment of the present disclosure; Figure 2 A schematic diagram of an access rights control and auditing system according to an embodiment of the present disclosure; Figure 3 A structural block diagram of a device configured for a network according to an embodiment of the present disclosure; Figure 4 A flowchart of an example method for applying the present disclosure. DETAILED DESCRIPTION
[0013] This application describes multiple embodiments, but this description is exemplary rather than restrictive, and it will be apparent to those skilled in the art that there may be more embodiments and implementations within the scope of the embodiments described herein. Although many possible feature combinations are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with any other feature or element in any other embodiment, or may replace any other feature or element in any other embodiment.
[0014] The present application includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features, and elements disclosed in this application may also be combined with any conventional features or elements to form a unique inventive solution. Any features or elements of any embodiment may also be combined with features or elements from other inventive solutions to form another unique inventive solution. Therefore, it should be understood that any feature shown and / or discussed in this application may be implemented individually or in any appropriate combination. Therefore, except for the limitations made according to the appended claims and their equivalents, the embodiments are not subject to other limitations. In addition, various modifications and changes may be made within the scope of protection of the appended claims.
[0015] In addition, when describing representative embodiments, the specification may have presented the method and / or process as a specific sequence of steps. However, to the extent that the method or process does not rely on the specific order of the steps described herein, the method or process should not be limited to the steps in the specific order described. As will be understood by those skilled in the art, other orders of steps are also possible. Therefore, the specific order of the steps set forth in the specification should not be interpreted as a limitation to the claims. In addition, the claims for the method and / or process should not be limited to performing their steps in the order written, and those skilled in the art can readily understand that these orders can be changed and still remain within the spirit and scope of the embodiments of the present application.
[0016] Figure 1 This is a flowchart of the network configuration method according to the embodiment of the present disclosure, which is applied to large-scale networks, such as Figure 1 As shown, including: Step 101: Load two or more modules into a preset template, wherein the two or more modules are used to perform parameter configuration of a large-scale network. All modules edit configuration-related information according to the same preset format. The configuration-related information of each module includes the calling relationship between modules and the following configuration execution information: configuration tool and its loading address, configuration file path, and configuration parameters from other modules; Step 102: Determine the execution order of module configuration based on the calling relationship between modules; Step 103: According to the determined execution order, the network parameters are configured one by one according to the configuration execution information of the modules in the template until all modules have completed the parameter configuration. The network parameter configuration is completed.
[0017] In the embodiment of the present disclosure, for a large-scale network, two or more modules in a template perform network parameter configuration. By setting the editing format of configuration-related information, it is ensured that different types of configuration parameters can be transmitted and shared between modules. Different configuration tools can be loaded through the configuration execution information of the module, and different types of parameter configurations based on different configuration tools are realized, thereby avoiding the problem that the configuration tools are inconsistent and cannot be configured at the same time, and achieving compatibility of multiple types of network parameter configurations. The modules in the template determine the execution order of the module configuration according to the calling relationship between the modules. For each module, after the configuration tool is loaded according to the configuration tool and its loading address, the configuration tool accesses the configuration file and configuration parameters from other modules according to the configuration file path to realize parameter configuration. After completing the parameter configuration of all modules, the parameter configuration of the large-scale network is realized.
[0018] In an exemplary instance, the embodiment of the present disclosure can implement partial or complete parameter configuration of the network through the above template. It can configure only one parameter of the network or configure multiple parameters of the network at the same time. The embodiment of the present disclosure does not limit this.
[0019] In an exemplary embodiment, the method of the present disclosure further includes: Parameter configuration of large-scale networks through two or more templates; When two or more templates contain the same module, the loaded module is called through the template name and the module name.
[0020] The disclosed embodiment can set different types of parameters to be configured using different templates. A network can complete network parameter configuration through the collaboration of two or more templates. The templates can call loaded modules through the template name and module name, which reduces the redundancy of parameter configuration, reduces the workload of parameter configuration, and improves the efficiency of parameter configuration.
[0021] The template of the embodiment of the present disclosure can be imported through the import instruction. After importing, the module can be called through the name of other templates and the name of the called block; for example, if the module named block1 in template 1 (module1) needs to be used in template 2, deps: module1.block1 can be used to call module 1.
[0022] The loading address of the configuration tool in the embodiment of the present disclosure may be used to define the source of the source file of the configuration tool, and the source may be from a URL, or from other places such as a database.
[0023] In an exemplary instance, the configuration tools in the embodiments of the present disclosure may include: terraform and / or ansible, etc. For example, the configuration tools may also include Docker Compose, and may also include other configuration tools that can be used for network parameter configuration, which is not limited in the embodiments of the present disclosure.
[0024] In an exemplary embodiment, the embodiment of the present disclosure configures network parameters one by one according to the configuration execution information of the modules in the template, including performing the following processing on the modules that execute parameter configuration in the execution order: Read the configuration file according to the configuration file path; According to the configuration parameters from other modules, read each configuration parameter from other modules; Generates an executable script for parameter configuration based on the read configuration file and each configuration parameter from other modules, as well as the configuration tool and its loading address; The configuration tool is called through the generated executable script to configure the module parameters according to the configuration file in the executable script and each configuration parameter from other modules.
[0025] In an exemplary instance, the module of the embodiment of the present disclosure executes parameter configuration according to a determined execution order. After the module executes parameter configuration, it will obtain configuration parameters that need to be transmitted to other modules. When subsequent modules execute parameter configuration, they can read configuration parameters from other modules according to the configuration parameters from other modules in the configuration execution information.
[0026] In an exemplary embodiment, the method of the present disclosure further includes: When a large-scale network changes, the configuration-related information in the template is edited according to the network changes based on the received first editing instruction; Editing includes one or any combination of the following: deleting, updating, and adding.
[0027] The configuration-related information edited and adjusted in the embodiment of the present disclosure may include: the calling relationship between modules, the configuration tool and its loading address, the configuration file path, and the configuration parameters from other modules; for example, the configuration-related information in the template is updated, the configuration parameters from other modules are updated, the configuration tool and its loading address are updated, etc.
[0028] In an exemplary embodiment, the method of the present disclosure further includes: When large-scale network changes occur, the configuration-related information in the template is edited according to the received editing instructions; Editing includes one or any combination of the following: deleting, updating, and adding.
[0029] In an exemplary embodiment, the method of the present disclosure further includes: Editing the configuration-related information in the template according to the received second editing instruction to generate a template to be used; Editing includes one or any combination of the following: deleting, updating, and adding.
[0030] The embodiment of the present disclosure can edit the template and store the template as a template to be used, which can be used for parameter configuration of different large-scale networks. The template to be used is used as the basic template to edit and generate a template suitable for the current network, saving the workload of parameter configuration based on the template and improving the configuration efficiency of network parameters. The embodiment of the present disclosure can generate corresponding templates to be used according to different types of parameter configurations.
[0031] In an exemplary embodiment, the configuration execution information in the embodiment of the present disclosure further includes agent-related information. Before configuring network parameters according to the configuration execution information of the modules in the template one by one according to the determined execution order, the method of the embodiment of the present disclosure further includes: When it is determined based on proxy-related information that a proxy is required for parameter configuration, proxy verification of the parameter configuration is performed using authentication information in the proxy-related information.
[0032] In the system parameter configuration of networks in related technologies, it is usually necessary to fully match the required permissions with the user permissions, which is often difficult to achieve in real-world use. For example, for routers, the configuration of virtual routers often requires superuser permissions, and the content that can be configured with superuser permissions far exceeds the scope of virtual router configuration. In addition, authorization is sometimes related to order. For example, a user is allowed to delete files and use the su command to become another user, but the user is not allowed to use the su command to become another user and then delete files. In this case, role-based access control is difficult to achieve the requirements. In order to achieve fine-grained access control permissions for the target system, it is generally necessary to establish a fine-grained access control list based on roles and parameters and role command parameters. In this design, all commands and their parameters must be constrained in advance, which is often difficult to implement and cannot require the order in which commands are executed.
[0033] The present disclosure also provides an access control and audit system based on intelligent agents, see Figure 2 ,include: First, when performing parameter configuration, the user logs in to the intelligent agent system. The intelligent agent system can be a terminal or an HTTP proxy, which receives the configuration commands and parameters from the user; The intelligent agent system checks the pre-stored access control list, which specifies the allowed configuration commands and parameters. If allowed, it proceeds to the next step; otherwise, it reports an error to the user. The configuration commands and their parameters from the user are recorded in the intelligent audit system, which determines whether the authorization requirements are met based on the pre-set command sequence rules. If so, execution is allowed; otherwise, an error is reported to the user.
[0034] According to the pre-acquired anomaly detection algorithm, the anomaly detection algorithm based on the command sequence is performed. If it is normal, the execution is allowed. Otherwise, an error is reported to the user, and the user requests manual review; When the abnormality detection based on the command sequence is normal, the parameter configuration is executed.
[0035] The command sequence-based anomaly detection algorithm of the disclosed embodiment may include: obtaining a set of normal command execution samples and identifying those that meet and do not meet security requirements. The user's configuration commands and parameters are encoded separately and trained using a long short-term memory (LSTM) algorithm to form command and parameter anomaly detection models. During the detection phase, when a new command arrives, it is detected using the encoded anomaly detection model. If any detection model detects an anomaly, the command is marked as an abnormal command.
[0036] As described above, the embodiment of the present disclosure can form a simplified version of the user configuration by implementing a command summary system, which can quickly reproduce the user configuration. This includes: for the command input by the user, checking whether it is an erroneous command or an output status command, if so, deleting it, otherwise proceeding to the next step. Checking whether the command is a command related to the target system, if so, proceeding to the next step, otherwise deleting it. Using an automatic evaluation algorithm, check whether the command is a more important command, if so, retain it, if not, annotate the credibility of the command after the command. The automatic evaluation algorithm can be based on statistical probability or a sequence-to-value seq2vec model.
[0037] The embodiment of the present disclosure further provides a computer storage medium, in which a computer program is stored. When the computer program is executed by a processor, the above-mentioned network configuration method is implemented.
[0038] The embodiment of the present disclosure further provides a terminal, comprising: a memory and a processor, wherein a computer program is stored in the memory; The processor is configured to execute the computer program in the memory; When the computer program is executed by a processor, the above-mentioned network configuration method is implemented.
[0039] Figure 3 The structural block diagram of the network configuration device of the embodiment of the present disclosure is applied to a large-scale network, including: a loading module unit, a determining sequence unit and a processing unit; wherein, The module loading unit is configured to load two or more modules in a preset template, wherein the two or more modules are used to execute parameter configuration of a large-scale network, and configuration-related information is edited in all modules according to the same preset format. The configuration-related information of each module includes the calling relationship between modules and the following configuration execution information: configuration tool and its loading address, configuration file path, and configuration parameters from other modules; Determine the order unit settings as follows: determine the execution order of module configurations based on the calling relationships between modules; The processing unit is configured to: configure network parameters one by one according to the configuration execution information of the modules in the template according to the determined execution order, until all modules have completed parameter configuration, thus completing the network parameter configuration.
[0040] In an exemplary embodiment, the loading module unit of the embodiment of the present disclosure is further configured to: Parameter configuration of large-scale networks through two or more templates; When two or more templates contain the same module, the loaded module is called through the name of the template and the name of the module.
[0041] In an exemplary embodiment, the configuration tool in the embodiment of the present disclosure includes: terraform and / or ansible.
[0042] In an exemplary embodiment, the processing unit of the embodiment of the present disclosure is configured to configure network parameters one by one according to the configuration execution information of the modules in the template, including performing the following processing on the modules that perform parameter configuration in the execution order: Read the configuration file according to the configuration file path; According to the configuration parameters from other modules, read each configuration parameter from other modules; Generate an executable script for parameter configuration according to the read configuration file and each configuration parameter from other modules, and the configuration tool and its loading address; The configuration tool is called through the generated executable script to configure the module parameters according to the configuration file in the executable script and each configuration parameter from other modules.
[0043] In an exemplary embodiment, the configuration execution information of the embodiment of the present disclosure further includes agent-related information. The embodiment of the present disclosure further includes an agent processing unit configured to: When it is determined based on proxy-related information that a proxy is required for parameter configuration, proxy verification of the parameter configuration is performed using authentication information in the proxy-related information.
[0044] In an exemplary embodiment, the apparatus of the present disclosure further includes a first editing unit configured to: When a large-scale network changes, the configuration-related information in the template is edited according to the network changes based on the received first editing instruction; Editing includes one or any combination of the following: deleting, updating, and adding.
[0045] In an exemplary embodiment, the apparatus of the present disclosure further includes a second editing unit configured to: Editing the configuration-related information in the template according to the received second editing instruction to generate a template to be used; Editing includes one or any combination of the following: deleting, updating, and adding.
[0046] Application Examples The following briefly describes the embodiments of the present disclosure through application examples. The application examples are only used to illustrate the embodiments of the present disclosure and are not used to limit the scope of protection of the embodiments of the present disclosure.
[0047] The embodiment of the present disclosure designs a module in which the template can configure multiple configuration tools at the same time, and allows different configuration tools to pass configuration parameters to each other, thereby achieving unified configuration. The template is read by an interpreter, and the execution order is designed according to the mutual dependencies of the various module parts described therein, and it can be executed in an orderly manner. The output during execution is shared between the various module parts in the form of variables. The template of the embodiment of the present disclosure can be written in YAML format. In actual implementation, it can also be written in other formats such as XML, JSON, etc. The embodiment of the present disclosure is briefly described below through programming examples. The sample code is as follows: name: "Template Example" description: "This is a simple example" import: "Other template locations to import" - name: module1 blocks: block: - name: network1 (module network1) - type: terraform (configuration tool is terraform) - location: http: / / www.someplace.com / setup / terraform / examp_1.tf (configuration file path) - via:http: / / user:pass@host:port / (proxy related information) - auth: None - deps:module1.block1 - args: (set parameters according to args requirements and set authentication information according to auth) conf: http: / / www.otherplace.com / setup / terraform / examp_1.conf block: - name: sysconf1 - type: ansible (configuration tool is ansible) - location: ansible-galaxy: / / role_name / - via: None (select whether to use a proxy) - deps: network1 determines the execution order - args: (references the contents of the previous module, network1.ips, network1.networkd, network1.authinfo, which come from block network1) conf:http: / / www.otherplace.com / setup / example / examp_1.conf myips:network1.ips mynet: network1.networks auth: network1.authinfo The template of the embodiment of the present disclosure is composed of several modules, each module declares one of the configured configuration tools, and the contents contained in each module may include: the name of the module (name), the type of the configuration tool (type), the source (location) of the file of the configuration tool configured by this parameter, the source is a URL, which can come not only from the local but also from the remote, and can even be downloaded from a proprietary command like ansible-galaxy; via is predetermined, indicating whether the execution process of the command needs to go through a proxy, and the proxy is a field similar to a URL, such as http: / / user:pass@host:port / dir / , where user is the user name, pass is the password, host is the proxy host name or IP, port is the proxy port, http is the proxy protocol, and here it can also be ssh representing the ssh proxy; deps represents the dependencies of this module, followed by the dependent prerequisite modules; args represents the parameters required for this command.
[0048] The embodiment of the present disclosure can be composed of multiple templates to form a template for parameter configuration of a large-scale network. The template can be imported through the import instruction. The source of the source file can be defined in this module. The source can come from a URL or from other places such as a database. When other modules use the modules in this template file, they can use the import name plus the module name to reference them. As in the above example, if you need to use a module named block1 in module1, just use deps: module1.block1.
[0049] The execution order of the template in the embodiment of the present disclosure is as follows Figure 4 As shown, including: Step 401: Read configuration-related information; configuration-related information includes the calling relationship between modules, configuration tools and their loading addresses, configuration file paths, and configuration parameters from other modules; Step 402: Determine the execution order of the module configuration based on the calling relationship between the modules. In the embodiment of the present disclosure, the dependency relationship is first determined according to the description in deps in the above code file, and the dependent modules are executed first. For example, in the above example, the network1 module needs to be executed before the sysconf1 module is executed. When there is no dependency relationship, the modules are executed in the order of appearance.
[0050] Step 403: Based on the proxy-related information, perform the relevant processing related to whether to use the proxy. For each module, check whether the via option is present. If the via option is present, use the proxy according to the via parameters. The proxy authentication method of the disclosed embodiment is role-based, and the authentication method is specified by the via parameters, which can be obtained based on a one-time password or based on dynamic authentication information obtained from an external URL for verification.
[0051] Step 404: Obtain the module for executing parameter configuration; obtain the configuration file to be run according to the type and location in the block; this configuration file can be obtained in different ways.
[0052] Step 405: Set preset variables: set parameters according to args requirements and set authentication information according to auth; Step 406: Parameter configuration of the execution module; according to type, run the automatic configuration tool with the args parameter; Step 407: Obtain module output. After parsing the template, the parser in this embodiment of the disclosure invokes the execution tool based on the values of the keywords in the template and enters the parameters required by the user to perform environment configuration. If the execution is successful, the result is a successful environment configuration, such as adding a route to a switch, configuring an IP address for a server, or installing an application on the system. This is primarily determined by the tool (type) selected by the user, the contents of the configuration file, and the parameters (args) entered by the user. Step 408, set output configuration parameters: set the output variable to the variable named name.var; in the embodiment of the present disclosure, after the execution parameter configuration of each module is completed, the execution continues in the order defined by the user in the template. If there are dependent output configuration parameters of the module, the variable value, such as the specific IP address, can be obtained here.
[0053] Step 409: Determine whether there is a next module; if there is a next module, start running the next module from step 403, otherwise end.
[0054] Those skilled in the art will appreciate that all or some of the steps, systems, and functional modules / units in the methods, systems, and devices disclosed above may be implemented as software, firmware, hardware, or any combination thereof. In hardware implementations, the division between functional modules / units described above does not necessarily correspond to the division between physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on computer-readable media, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is well known to those skilled in the art, the term "computer storage media" encompasses volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
Claims
1. A network configuration method, applied to a large-scale network, characterized in that: include: Load two or more modules in a preset template, where the two or more modules are used to perform parameter configuration of a large-scale network. All modules edit configuration-related information according to the same preset format. The configuration-related information of each module includes the calling relationship between modules and the following configuration execution information: configuration tool and its loading address, configuration file path, and configuration parameters from other modules; Determine the execution order of module configuration based on the calling relationship between modules; According to the determined execution order, the network parameters are configured one by one according to the configuration execution information of the modules in the template until all modules have completed the parameter configuration, and the network parameter configuration is completed.
2. The method according to claim 1, characterized in that The method further comprises: Performing parameter configuration of the large-scale network using two or more templates; When the two or more templates contain the same module, the loaded module is called through the name of the template and the name of the module.
3. The method according to claim 1, characterized in that The configuration tools include: terraform and / or ansible.
4. The method according to claim 1, wherein The parameter configuration of the network is performed one by one according to the configuration execution information of the modules in the template, including performing the following processing on the modules that perform parameter configuration in the execution order: Read the configuration file according to the configuration file path; Read each configuration parameter from the other modules according to the configuration parameters from the other modules; Generate an executable script for parameter configuration according to the read configuration file and each configuration parameter from other modules, and the configuration tool and its loading address; The configuration tool is called by the generated executable script to configure the parameters of the module according to the configuration file in the executable script and each configuration parameter from other modules.
5. The method according to any one of claims 1 to 4, characterized in that The configuration execution information also includes agent-related information. Before configuring network parameters one by one according to the configuration execution information of the modules in the template according to the determined execution order, the method further includes: When it is determined according to the proxy related information that the parameter configuration needs to use a proxy, proxy verification of the parameter configuration is performed using the authentication information in the proxy related information.
6. The method according to any one of claims 1 to 4, characterized in that The method further comprises: When the large-scale network changes, the configuration-related information in the template is edited according to the network changes according to the received first editing instruction; The editing includes one or any combination of the following: deletion, update and addition.
7. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Editing the configuration-related information in the template according to the received second editing instruction to generate a template to be used; The editing includes one or any combination of the following: deletion, update and addition.
8. A computer storage medium storing a computer program, wherein the computer storage medium stores a computer program, and when the computer program is executed by a processor, the network configuration method according to any one of claims 1 to 7 is implemented.
9. A terminal comprising: A memory and a processor, wherein the memory stores a computer program; wherein, The processor is configured to execute the computer program in the memory; When the computer program is executed by the processor, the network configuration method according to any one of claims 1 to 7 is implemented.
10. A network configuration device, applied to a large-scale network, characterized in that: include: Load module unit, determine order unit and process unit; wherein, The module loading unit is configured to load two or more modules in a preset template, wherein the two or more modules are used to execute parameter configuration of a large-scale network, and configuration-related information is edited in all modules according to the same preset format. The configuration-related information of each module includes the calling relationship between modules and the following configuration execution information: configuration tool and its loading address, configuration file path, and configuration parameters from other modules; Determine the order unit settings as follows: determine the execution order of module configurations based on the calling relationships between modules; The processing unit is configured to: configure network parameters one by one according to the configuration execution information of the modules in the template according to the determined execution order, until all modules have completed parameter configuration, thus completing the network parameter configuration.