Configuration method and related equipment
By recording command input requirements and/or command result output methods in the configuration file, the code compatibility problem between different front-end configuration tools is solved, and the unified system configuration management and the improvement of user experience is achieved.
Patent Information
- Application Number
- CN202411983931.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-05-02
AI Technical Summary
Existing configuration management tools cannot achieve code compatibility between different front-end configuration tools, resulting in increased difficulty in managing unified management of management system configuration items.
By recording the command input requirements and/or command result output methods associated with the target command in the configuration file, the target commands initiated by different front-end configuration tools are uniformly processed, thereby achieving compatibility with different front-end configuration tools.
It realizes compatibility with different front-end configuration tools, simplifies system configuration management, and improves user experience and management efficiency.
Smart Images

Figure CN119922077A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of device configuration, and in particular to a configuration method and related devices. Background Art
[0002] In order to more conveniently manage system configuration items, existing configuration management tools include a Web user interface based on a Web UI and a command-line interface (CLI) based on a command line.
[0003] The currently popular Web UI-based management approach provides a RESTful API service for configuration management. Users operate through the Web UI, exchanging data in JSON / XML format with the RESTful API service under different operations. The RESTful API service then adds, deletes, modifies, and queries the system configuration based on the user's operations. In contrast, command-line-based management methods typically use built-in command-line tools, allowing users to more directly add, delete, modify, and query system configurations by manually entering command lines in the CLI.
[0004] In actual development scenarios, the system configuration will support both of the above management methods. However, these two management methods are implemented through independent code and are not compatible with each other. Summary of the Invention
[0005] The embodiments of the present application provide a configuration method and related devices for uniformly processing target commands initiated by different front-end configuration tools to achieve compatibility with different front-end configuration tools.
[0006] A first aspect of an embodiment of the present application provides a configuration method, which is applied to a front-end device, wherein the front-end device is installed with a front-end configuration tool. The configuration method includes:
[0007] In response to a target command input through the front-end configuration tool, the command input requirements associated with the target command are obtained from the configuration file and the command input indication information of the target command is displayed on the front-end configuration tool according to the command input requirements, and / or the command result output mode associated with the target command is obtained from the configuration file and the command result information of the target command is displayed on the front-end configuration tool according to the command result output mode.
[0008] In a specific implementation, displaying the command input instruction information of the target command on the front-end configuration tool according to the command input requirement includes:
[0009] Based on the command input requirement, searching the configuration file for supported configuration fields, and obtaining a value constraint for each of the configuration fields, the value constraint including at least one of a value type, a value range, and an input format;
[0010] Each of the configuration fields and the value constraint of each of the configuration fields are used as the command input indication information and displayed in the front-end configuration tool.
[0011] In a specific implementation, the configuration field includes an external reference field, and obtaining the value constraint of the external reference field includes:
[0012] Searching the configuration file for the external module and reference field associated with the external reference field;
[0013] A reference command including the reference field identifier is sent to the external module, and the field value of the reference field returned by the external module is obtained as a value constraint of the external reference field.
[0014] In a specific implementation, after displaying the command input instruction information of the target command on the front-end configuration tool according to the command input requirement, the method further includes:
[0015] In response to a confirmation operation initiated by the front-end configuration tool for the target command, obtaining configuration information input in the front-end configuration tool according to the command input instruction information;
[0016] The configuration information is encapsulated based on a preset object format, and the encapsulated configuration information is sent to a service interface module, so that the service interface module performs configuration using the configuration information parsed from the encapsulated configuration information.
[0017] A second aspect of an embodiment of the present application provides a configuration method, which is applied to a service interface module. The configuration method includes:
[0018] Receiving a configuration request sent by a front-end device, wherein the configuration request is initiated by a front-end configuration tool installed in the front-end device;
[0019] A configuration file is sent to the front-end device in response to the configuration request; wherein, the configuration file includes command input requirements and / or command result output methods associated with the target command, the command input requirements associated with the target command are used to display the command input indication information of the target command on the front-end configuration tool, and the command result output methods associated with the target command are used to display the command result information of the target command on the front-end configuration tool.
[0020] A third aspect of the present application provides a front-end device, including:
[0021] A display unit is used to respond to a target command input through the front-end configuration tool, obtain the command input requirements associated with the target command from the configuration file and display the command input indication information of the target command on the front-end configuration tool according to the command input requirements, and / or obtain the command result output mode associated with the target command from the configuration file and display the command result information of the target command on the front-end configuration tool according to the command result output mode.
[0022] In a specific implementation, the display unit is specifically used to search for supported configuration fields in the configuration file based on the command input requirements, and obtain the value constraints of each configuration field, wherein the value constraints include at least one of the numerical type, value range and input format; each configuration field and the value constraint of each configuration field are used as the command input indication information and displayed in the front-end configuration tool.
[0023] In a specific implementation, the configuration field includes an external reference field, and the display unit is further used to search the external module and reference field associated with the external reference field from the configuration file; send a reference command containing the reference field identifier to the external module, and obtain the field value of the reference field returned by the external module as the value constraint of the external reference field.
[0024] In a specific implementation, after displaying the command input indication information of the target command on the front-end configuration tool according to the command input requirement, the front-end device further includes: an acquisition unit and a configuration unit;
[0025] The acquiring unit is configured to acquire, in response to a confirmation operation initiated by the front-end configuration tool for the target command, the configuration information input in the front-end configuration tool according to the command input indication information;
[0026] The configuration unit is configured to encapsulate the configuration information based on a preset object format and send the encapsulated configuration information to the service interface module, so that the service interface module performs configuration using the configuration information parsed from the encapsulated configuration information.
[0027] A fourth aspect of the embodiments of the present application provides a service interface module, including:
[0028] A receiving unit, configured to receive a configuration request sent by a front-end device, wherein the configuration request is initiated by a front-end configuration tool installed in the front-end device;
[0029] A sending unit, configured to send a configuration file to the front-end device in response to the configuration request; wherein the configuration file includes command input requirements and / or command result output methods associated with the target command, the command input requirements associated with the target command are used to display the command input indication information of the target command on the front-end configuration tool, and the command result output methods associated with the target command are used to display the command result information of the target command on the front-end configuration tool.
[0030] A fifth aspect of the present application provides a computer device, including:
[0031] CPU, memory and input / output interfaces;
[0032] The memory is a transient storage memory or a persistent storage memory;
[0033] The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the method described in the first aspect or the second aspect.
[0034] A sixth aspect of the embodiments of the present application provides a computer program product comprising instructions, which, when run on a computer, enables the computer to execute the method described in the first aspect or the second aspect.
[0035] A seventh aspect of an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores instructions. When the instructions are executed on a computer, the computer executes the method described in the first aspect or the second aspect.
[0036] It can be seen from the above technical solution that the embodiment of the present application has the following advantages: the command input requirements and / or command result output methods associated with the target command are recorded in the configuration file. If the front-end device responds to the target command input through the front-end configuration tool, it can display the command input indication information of the target command in the front-end configuration tool according to the command input requirements associated with the target command, and / or display the command result information of the target command in the front-end configuration tool according to the command result output method associated with the target command. In the embodiment of the present application, no matter which front-end configuration tool is used to initiate the target command, it can be uniformly processed through the command input requirements and / or command result output methods in the configuration file, thereby achieving compatibility with different front-end configuration tools. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of a flow chart of the configuration method disclosed in an embodiment of the present application;
[0038] Figure 2 This is a schematic diagram of the configuration page of the WebUI-based configuration tool disclosed in the embodiment of this application;
[0039] Figure 3 A system architecture diagram of the configuration method of the embodiment of the present application disclosed in the embodiment of the present application;
[0040] Figure 4 A schematic structural diagram of a front-end device disclosed in an embodiment of the present application;
[0041] Figure 5 A schematic diagram of the structure of the service interface module disclosed in the embodiment of this application;
[0042] Figure 6 This is another structural diagram of the computer device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0044] The embodiments of the present application provide a configuration method and related devices for uniformly processing target commands initiated by different front-end configuration tools to achieve compatibility with different front-end configuration tools.
[0045] See also Figure 1 The present invention provides a configuration method, using a front-end device, including the following steps:
[0046] 101. In response to a target command input through a front-end configuration tool, obtain command input requirements associated with the target command from a configuration file and display command input indication information of the target command on the front-end configuration tool according to the command input requirements, and / or obtain a command result output method associated with the target command from the configuration file and display command result information of the target command on the front-end configuration tool according to the command result output method.
[0047] If the front-end device receives a target command input by the user through the front-end configuration tool deployed on the front-end device, it means that the user needs to initiate a corresponding operation through the target command. The target command may include but is not limited to a query command, a new command, and a delete command, etc. The front-end configuration tool may be a configuration tool based on a local command line, a configuration tool based on a remote command line, and / or a configuration tool based on a WebUI, etc. Specifically, the target command input through the front-end configuration tool can be Figure 2 The command control such as the new control or query control shown is initiated, or can be initiated through a command instruction such as a new instruction or query instruction.
[0048] Therefore, in response to a target command input through a front-end configuration tool, embodiments of the present application can parse a preset configuration file and obtain the command input requirements and / or command result output method associated with the target command from the configuration file, and perform subsequent processing based on the information. Generally, the configuration file can include at least one of the command input requirements and the command result output method. Furthermore, depending on the content of the configuration file, embodiments of the present application can perform different subsequent processing.
[0049] If the configuration file contains command input requirements associated with the target command, it means that the execution of the target command (or the confirmation of the target command) also depends on the configuration information input by the user. In order to guide the user to input accurate and standardized configuration information, the embodiment of the present application can display the command input instruction information of the target command in the front-end configuration tool according to the command input requirements. Specifically, the command input requirements indicate the specifications that the configuration information entered by the user should comply with when the target command needs to be executed. Therefore, the embodiment of the present application can know the specifications that the configuration information entered by the user should comply with when executing the target command based on the command input requirements, and generate command input instruction information based on the aforementioned specifications to guide the user to input the configuration information by displaying the command input instruction information in the front-end configuration tool. In actual applications, when the target command is a newly added command, the configuration file contains command input requirements associated with the target command.
[0050] If the configuration file contains a command result output method associated with the target command, it means that the execution of the target command (or the confirmation of the target command) is to output the command result information, or it means that after the target command is executed, the command result information needs to be output, which is not limited here. On this basis, in order to adapt to the display schemes of different front-end configuration tools, the embodiment of the present application provides a command result output method to guide the front-end configuration tool to output the corresponding command result information according to the preset specifications. Among them, the command result output method indicates the fields and / or data formats required to be included in the command result information, which is not limited here. Therefore, the embodiment of the present application can generate command result information that can be displayed in the front-end configuration tool according to the instructions of the command result output method to inform the user of the execution result of the target command. In actual applications, when the target command is a query command, the configuration file contains the command input requirements associated with the target command.
[0051] In the embodiments of the present application, regardless of which front-end configuration tool is used to initiate the target command, the command input requirements and / or command result output methods in the configuration file can be uniformly processed, thus achieving compatibility with different front-end configuration tools. Furthermore, command input guidance information is generated through the configuration file to guide the user through the configuration, making it more user-friendly.
[0052] In some specific implementations, in addition to directly recording the configuration fields that should be included in the configuration information that the user needs to input in the command input requirements, or even directly recording the value constraints that the configuration fields need to meet in the command input requirements, the command input requirements of the embodiment of the present application can also be any information that can instruct the front-end device to obtain the configuration fields and the value constraints of the configuration fields. See the following steps for details: Based on the command input requirements, search the configuration file for supported configuration fields and obtain the value constraints of each configuration field. The value constraints include at least one of the numerical type, value range, and input format; display each configuration field and the value constraints of each configuration field as command input indication information in the front-end configuration tool. Among them, the configuration field is the supported configuration item; the value constraint of the configuration field is the field value constraint of each configuration field input by the user; the numerical type includes but is not limited to numbers and strings.
[0053] Specifically, in addition to the command input requirements, the configuration file also includes the configuration fields supported by the target command and the value constraints of the configuration fields. Considering that different commands support different configuration fields and their value constraints, the embodiment of the present application needs to search the corresponding location in the configuration file for the configuration fields supported by the target command and their value constraints based on the command input requirements. After obtaining the configuration fields and their value constraints, they are displayed as command input indication information in the front-end configuration tool.
[0054] In actual applications, different device modules support different target commands, and the specific operations performed when the same target command is issued to different device modules may also be different. Therefore, embodiments of the present application can configure corresponding configuration files for different device modules. When a user enters a target command through the front-end configuration tool, this target command corresponds to a specific operation object, namely the target device module. The configuration file of the target device module can then be used to search for the configuration fields supported by the target command and their value constraints.
[0055] Taking the routing module as an example, if the target command is initiated for the routing module, the configuration fields supported by the target command, that is, the configuration fields supported by the target instruction in the routing module include Metric (metric value), prefix (prefix), Nexthop (next hop) and outif (export interface), etc. Among them, the value type of Metric is a number, and the value range includes the maximum value, minimum value and fixed value. The value type of Prefix is subnet, which is the subnet type. The value type of Nexthop is ipaddr, which is the IP address. The value type of Outif is string, which is a string, and the value range includes the maximum length of the string is 16. Figure 2In response to the input of the newly added command, the command input indication information displayed in the front-end configuration tool may be the content in the brackets after the Metric, prefix, and Nexthop input boxes.
[0056] It is understandable that, in addition to obtaining the configuration fields directly from the configuration file of the target device module, in order to avoid redundant configuration of configuration fields in different device modules, the configuration fields of the embodiment of the present application can also be referenced configuration fields supported by other device modules (i.e., external reference fields) under the instruction of the command input requirements, such as Outif in the configuration fields listed in the aforementioned embodiment. In this case, the value constraints of the external reference fields can be obtained in the following manner: searching the external module and reference field associated with the external reference field from the configuration file; sending a reference command containing a reference field identifier to the external module, and obtaining the field value of the reference field returned by the external module as the value constraint of the external reference field.
[0057] Specifically, the command input requirement will include the external module and reference field associated with the external reference field, or the command input requirement will indicate the area in the configuration file that records the external module and reference field associated with the external reference field, so as to instruct the front-end device to send a reference command containing the reference field identifier to the external module associated with the external reference field, and use the field value of the reference field returned by the external module as the value constraint of the external reference field. Figure 2 In response to the input of the newly added command, the command input indication information displayed in the front-end configuration tool may be the content in the drop-down list corresponding to outif.
[0058] In some specific implementations, after the command input indication information of the target command is displayed in the front-end configuration tool according to the command input requirements, the method of the embodiment of the present application also includes the following steps: in response to the confirmation operation for the target command initiated by the front-end configuration tool, obtaining the configuration information input in the front-end configuration tool according to the command input indication information; encapsulating the configuration information based on a preset object format, and sending the encapsulated configuration information to the service interface module, so that the service interface module uses the configuration information parsed from the encapsulated configuration information for configuration.
[0059] Specifically, the confirmation operation for the target command refers to the operation of confirming the execution of the target command. In actual applications, the confirmation operation for the target command can be initiated in different ways for different target commands, which can be configured as needed. For example, if the target command is a new command, a confirmation instruction or control can be provided to confirm the new command, and after the confirmation instruction or control is triggered, the confirmation operation for the target command is initiated, such as Figure 2As shown, by selecting the confirmation control in the configuration interface of the new command, the confirmation operation of the new command is initiated; if the target command is a query command, the confirmation operation for the query command can be initiated synchronously after the user enters the query command, such as Figure 2 After entering the confirmation command, directly execute the query command to display the configuration information on the configuration page.
[0060] Following the command input instructions, the user can enter specific configuration information, such as the field values for configuration fields, into the front-end configuration tool. Subsequently, the service interface module, uniformly provided to different front-end configuration tools, can uniformly encapsulate the configuration information based on a preset object format and send the encapsulated configuration information to the service interface module. Because the configuration information input by different front-end configuration tools is encapsulated in a unified preset object format, the service interface module can parse the encapsulated configuration information based on the preset object format to obtain configuration information and perform configuration based on this configuration information, such as updating corresponding configuration items of the target module device based on the configuration information.
[0061] By introducing the service interface module, the embodiment of the present application can provide a unified service interface module on the server side for different and independent front-end configuration tools on the user side, so that the configuration management behaviors of different front-end configuration tools on the server side are consistent.
[0062] Furthermore, after receiving the configuration information input by the user based on the command input instruction information, the value constraints of each configuration field can be used as a condition for verifying the field value of the corresponding configuration field. For example, the field value of Metric can be verified to be a number and within the maximum and minimum values and a specified value range; the field value of Prefix can be verified to be of the subnet type; the field value of Nexthop can be verified to be an IP address; and the field value of Outif can be verified to be within the maximum string length of 16.
[0063] Furthermore, each configuration field supported by the target command can be optional or mandatory. Therefore, under the command input requirements, the configuration file can be searched for information indicating whether each configuration field is optional or mandatory, and this information can be displayed in the front-end configuration tool as part of the command input instruction information. Based on the above embodiment, Metric is an optional field, Prefix is a mandatory field, Nexthop is a mandatory field, and Outif is an optional field.
[0064] Furthermore, after receiving the configuration information input by the user based on the command input indication information and responding to the confirmation operation for the target command, if the field value of the required field is found to be empty, a prompt can be given to the user, and the field value of each configuration field whose field value is not empty can be encapsulated as configuration information and sent to the service interface module. Alternatively, after waiting to obtain the field value of the required field input by the user, the field value of each configuration field whose field value is not empty can be encapsulated as configuration information and sent to the service interface module.
[0065] Similarly, the step of displaying the command result information of the target command in the front-end configuration tool according to the command result output method associated with the target command can be specifically implemented in the following way: based on the command result output method associated with the target command, obtain the field to be output and the output format; obtain the field value of the field to be output, and display the field value of the field to be output in the front-end configuration tool according to the output format, wherein the field value of the field to be output belongs to the command result information of the target command.
[0066] Specifically, in addition to directly recording the specifications of the command result information that the front-end device needs to display in the front-end configuration tool in the command result output method, the command result output method of the embodiment of the present application can also be any information that can instruct the front-end device to obtain the specifications of the command result information. The specifications of the command result information include but are not limited to output fields and output formats, where the output fields can be any configuration fields, and the output format can be the way the front-end displays the field value of the output field, such as different forms of charts.
[0067] In some specific implementations, the front-end device can obtain the configuration file from the service interface module by sending a configuration request, thereby realizing real-time remote acquisition and dynamic parsing of the configuration file, so as to execute the configuration method of the embodiment of the present application, and realize updating and editing of the configuration file without restarting or compiling the front-end device or the front-end configuration tool. In some specific implementations, the service interface module receives the configuration request sent by the front-end device, and the configuration request is initiated by the front-end configuration tool installed on the front-end device; and the service interface module sends the configuration file to the front-end device in response to the configuration request; wherein the configuration file includes the command input requirements and / or command result output mode associated with the target command, the command input requirements associated with the target command are used to display the command input indication information of the target command on the front-end configuration tool, and the command result output mode associated with the target command is used to display the command result information of the target command on the front-end configuration tool.
[0068] Specifically, after the service interface module responds to the configuration request sent by the front-end device, it can send the configuration file to the front-end device, which then parses the configuration file and performs subsequent processing. The steps of parsing the configuration file and performing subsequent processing by the front-end device in this embodiment of the application are similar to those in the embodiment described in step 101 and will not be repeated here.
[0069] In addition, if the embodiment of the present application is configured with corresponding configuration files for different device modules, then when the service interface module obtains the configuration file, it also needs to obtain the configuration file corresponding to the target device module according to the target device module indicated by the configuration request, so that the front-end device can parse the configuration file and receive the user's configuration management operations for the target device module.
[0070] The foregoing describes various implementations of the configuration method of the present application. The following describes the configuration method of an embodiment of the present application in a specific business scenario.
[0071] 1. Configure a corresponding configuration file for each device module and store it in JSON Schema format. The configuration file is used to support the implementation of the configuration method of the embodiment of the application. The configuration file includes, but is not limited to, the following four parts. In addition to using JSON Schema format to store the configuration file, other interpretive formats including, but not limited to, INI format, XML format, YANG format, and custom formats can also be used instead.
[0072] ① Basic information, including the device module name, the email information of the device module author, the release time of the device module, and the device module description.
[0073] ② Configuration items primarily describe configuration relationships through custom types. Custom private types are used to summarize supported configuration fields. Configuration items include configuration fields, along with their corresponding configuration field names, value constraints, and reference relationships. Configuration fields with reference relationships are external reference fields from other device modules.
[0074] ③Preset encapsulation format, this part of the content can be included in the configuration related part.
[0075] ④ Supported commands, including the supported command name, command description, command input requirements associated with the command, command result output format, command execution method, and whether it can be accessed by other device modules. The command execution method refers to the method by which the service interface module initiates the command execution operation.
[0076] 2. Before managing the management system configuration, the front-end configuration tool obtains the json schema file of the corresponding device module, that is, the configuration file, through the service interface module such as the Restful service.
[0077] 3. By parsing the configuration file, the configuration fields and value constraints required for managing the target device module are obtained and displayed in the front-end configuration tool as command input guidance information. The parsing process and the parsed content are the same for different front-end configuration tools, but the format of the information displayed by different front-end configuration tools is different. For example, the configuration tool based on WebUI displays Figure 2 The interface shown is generated in response to the input of the newly added command, while the configuration tool based on the local command line or remote command line directly displays the text of the command input guidance information.
[0078] 4. The user fills in the field values for each configuration field according to the command input guidance information. In response to the confirmation operation of the new command, the configuration information input by the user is obtained and the command execution method of the new command is called. The encapsulated configuration information is sent to the service interface module, so that the service interface module completes subsequent configuration addition operations (including but not limited to configuration verification and configuration update) based on the configuration information.
[0079] 5. The service interface module parses the encapsulated configuration information using a pre-set encapsulation format and verifies the values of each configuration field in the parsed configuration information based on the value constraints of each configuration field. The verification rules can be regular expressions or other proprietary rules, which are not limited here.
[0080] 6. Update the configuration of the routing module based on the verified configuration information.
[0081] In traditional solutions, configuration tools based on local command lines or remote command lines can directly use the device's built-in commands to implement configuration management behaviors, while configuration tools based on WebUI implement configuration management behaviors through remote operations such as the HTTP protocol. Therefore, in traditional solutions, the implementation of the two is independent.
[0082] The embodiment of the present application redefines the value constraints of the configuration fields and the command input requirements and command result output methods associated with the configuration file. This configuration method not only supports command execution, but also verifies the configuration information entered by the user. Figure 3 In short, the difference between the embodiments of the present application and the traditional method is that the traditional method is to operate the configuration through a configuration tool based on a local command line, a remote command line or a WebUI (I operate the configuration); while the present invention is to use a configuration file to guide the configuration tool based on a local command line, a remote command line or a WebUI (you can operate the configuration in this way).
[0083] See also Figure 4 , an embodiment of the present application provides a front-end device, including:
[0084] The display unit 401 is used to respond to the target command input through the front-end configuration tool, obtain the command input requirements associated with the target command from the configuration file and display the command input indication information of the target command on the front-end configuration tool according to the command input requirements, and / or obtain the command result output mode associated with the target command from the configuration file and display the command result information of the target command on the front-end configuration tool according to the command result output mode.
[0085] In a specific implementation, the display unit 401 is specifically used to search for supported configuration fields in the configuration file based on command input requirements, and obtain the value constraints of each configuration field, where the value constraints include at least one of the numerical type, value range, and input format; each configuration field and the value constraints of each configuration field are displayed as command input indication information in the front-end configuration tool.
[0086] In a specific implementation, the configuration field includes an external reference field, and the display unit 401 is also used to search the external module and reference field associated with the external reference field from the configuration file; send a reference command containing a reference field identifier to the external module, and obtain the field value of the reference field returned by the external module as the value constraint of the external reference field.
[0087] In a specific implementation, after the command input indication information of the target command is displayed on the front-end configuration tool according to the command input requirement, the front-end device further includes: an acquisition unit and a configuration unit;
[0088] an acquiring unit, configured to acquire, in response to a confirmation operation for a target command initiated by the front-end configuration tool, configuration information input in the front-end configuration tool according to the command input indication information;
[0089] The configuration unit is used to encapsulate configuration information based on a preset object format and send the encapsulated configuration information to the service interface module, so that the service interface module uses the configuration information parsed from the encapsulated configuration information for configuration.
[0090] See also Figure 5 , an embodiment of the present application provides a service interface module, including:
[0091] The receiving unit 501 is configured to receive a configuration request sent by a front-end device, where the configuration request is initiated by a front-end configuration tool installed in the front-end device;
[0092] A sending unit 502 is used to send a configuration file to the front-end device in response to the configuration request; wherein the configuration file includes command input requirements and / or command result output methods associated with the target command, the command input requirements associated with the target command are used to display the command input indication information of the target command in the front-end configuration tool, and the command result output methods associated with the target command are used to display the command result information of the target command in the front-end configuration tool.
[0093] Figure 6 6 is a schematic diagram of a computer device structure provided in an embodiment of the present application. The computer device 600 may include one or more central processing units (CPU) 601 and a memory 605. The memory 605 stores one or more application programs or data.
[0094] Memory 605 may be volatile or persistent storage. The program stored in memory 605 may include one or more modules, each of which may include a series of instruction operations on the computer device. Furthermore, CPU 601 may be configured to communicate with memory 605 and execute the series of instruction operations in memory 605 on computer device 600.
[0095] The computer device 600 may also include one or more power supplies 602, one or more wired or wireless network interfaces 603, one or more input and output interfaces 604, and / or one or more operating systems, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc.
[0096] The CPU 601 can execute the aforementioned Figures 1 to 5 The operations performed by the front-end device and / or service interface module in the illustrated embodiment will not be described in detail here.
[0097] It should be noted that although the steps in the flowcharts involved in the various embodiments are drawn in sequence as indicated by the arrows, unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times. The order of execution of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with other steps or at least a portion of steps or stages in other steps.
[0098] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0099] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0100] The units described as separate components may or may not be physically separate, and 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 network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0101] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0102] If the integrated unit is implemented in the form of 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 application is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0103] An embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the configuration method described above.
Claims
1. A configuration method, characterized in that: Applied to a front-end device, the front-end device is installed with a front-end configuration tool, and the configuration method includes: In response to a target command input through the front-end configuration tool, a command input requirement associated with the target command is obtained from a configuration file and command input indication information of the target command is displayed on the front-end configuration tool according to the command input requirement, and / or a command result output mode associated with the target command is obtained from the configuration file and command result information of the target command is displayed on the front-end configuration tool according to the command result output mode.
2. The method according to claim 1, characterized in that: The displaying the command input indication information of the target command in the front-end configuration tool according to the command input requirement includes: Based on the command input requirement, searching the configuration file for supported configuration fields, and obtaining a value constraint of each configuration field, wherein the value constraint includes at least one of a numerical type, a value range, and an input format; Each of the configuration fields and the value constraints of each of the configuration fields are used as the command input indication information and displayed in the front-end configuration tool.
3. The method according to claim 2, characterized in that If the configuration field includes an external reference field, obtaining the value constraint of the external reference field includes: Searching the configuration file for the external module and reference field associated with the external reference field; A reference command including the reference field identifier is sent to the external module, and the field value of the reference field returned by the external module is obtained as a value constraint of the external reference field.
4. The method according to claim 1, characterized in that: After displaying the command input indication information of the target command in the front-end configuration tool according to the command input requirement, the method further includes: In response to a confirmation operation initiated by the front-end configuration tool for the target command, obtaining configuration information input in the front-end configuration tool according to the command input indication information; The configuration information is encapsulated based on a preset object format, and the encapsulated configuration information is sent to a service interface module, so that the service interface module performs configuration using the configuration information parsed from the encapsulated configuration information.
5. A configuration method, characterized in that: Applied to the service interface module, the configuration method includes: Receiving a configuration request sent by a front-end device, wherein the configuration request is initiated by a front-end configuration tool installed in the front-end device; A configuration file is sent to the front-end device in response to the configuration request; wherein the configuration file includes command input requirements and / or command result output methods associated with the target command, the command input requirements associated with the target command are used to display command input indication information of the target command on the front-end configuration tool, and the command result output methods associated with the target command are used to display command result information of the target command on the front-end configuration tool.
6. A front-end device, characterized in that: The front-end device is installed with a front-end configuration tool, and the front-end device includes: A display unit is used to, in response to a target command input through the front-end configuration tool, obtain a command input requirement associated with the target command from a configuration file and display command input indication information of the target command on the front-end configuration tool according to the command input requirement, and / or, obtain a command result output mode associated with the target command from the configuration file and display command result information of the target command on the front-end configuration tool according to the command result output mode.
7. A service interface module, characterized in that: include: A receiving unit, configured to receive a configuration request sent by a front-end device, wherein the configuration request is initiated by a front-end configuration tool installed in the front-end device; A sending unit, used to send a configuration file to the front-end device in response to the configuration request; wherein the configuration file includes a command input requirement and / or a command result output method associated with a target command, the command input requirement associated with the target command is used to display the command input indication information of the target command on the front-end configuration tool, and the command result output method associated with the target command is used to display the command result information of the target command on the front-end configuration tool.
8. A computer device, characterized in that: include: CPU, memory and input / output interface; The memory is a transient storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instruction operations in the memory to perform the configuration method according to any one of claims 1 to 4 or the configuration method according to claim 5.
9. A computer program product comprising instructions, characterized in that When the computer program product is executed on a computer, the computer is enabled to execute the configuration method according to any one of claims 1 to 4 or the configuration method according to claim 5.
10. A computer storage medium, characterized in that: The computer storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the configuration method according to any one of claims 1 to 4 or the configuration method according to claim 5.